Extract a particular value from another Snippets

Is there any way we extract a particular value from another snippets?

Hi @Pratik_Shah,

The way to do that, would be to import the other snippet into the snippet you want to insert. You can find the {import}command in the "Forms and Dynamic Content" menu at the bottom.

Once you've imported the other snippet, you could put it inside a {note} command block to keep it from being inserted alongside the other snippet. And once it's been imported, any variables that you defined in the imported snippet will also be applicable to the new snippet.

Say I'm importing Snippet A into Snippet B

Snippet A contains the variable {price=10}

Once Snippet A is imported into Snippet B, I will be able to use the variable price inside Snippet B as part of a formula and in other ways.

Hope this clarifies things. You can read more about {import} here: Text Blaze | {import}

Let me know if anything is unclear :slight_smile:

1 Like

Thanks. This looks pretty straightforward. I guess I understood clearly. I will check and let you know if I am facing any issues

Thank you for all your help.

1 Like

Anytime! :slight_smile:

1 Like