Put a formula in an asset

Hello,
I am currently creating assets to override hard values ​​in the workflow.
My problem is that I have a variable currently in the workflow which is New Random().Next(1,7), I would like to put it in an asset but when I put the asset in string it returns me the formula in question not a random number, and when I set the asset to integer, it doesn’t want me to type the formula in the value space.
Anyone have a solution?
Thank you,
Have a good day

Hello @Roxane_Crepeaux ,

If you want the Random number generation be dynamic without hardcoding the values, will that be feasible to store lower and upper limit to asset. That is 1 and 7 here. Instead of saving the entire formula you can save these values in the asset.

you can define an int assed for the range starting at 1 with max of the configured value from asset.

then just rewrite the random number part as following
grafik

So you can influence the random range from Asset. Another benefit is that we are more wide distributed and the numbers are more ~ randomly

Bypassing the compilation and stroring Code snippets within the asset will not work

Assets are just strings, ints, etc they don’t actually process commands.

As others suggested, store the values 1 and 7 in Assets and then use variables in your Next() arguments.

Thank you for your answers. I think I will make 2 assets with the mini and the maxi
Have a good day

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.