Passing custom parameters to dynamic code via macro's UF() method.
CompletedHello experts,
There is a way to pass custom parameters to dynamic code using macro's UF() method?
For example, I want to call a dynamic code via macro using UF() method and I want to pass one or more parameters (let's say a string value) in order to use this parameter to dymanic code.
Thank you in advanced,
Panagiotis
-
Thank you for your request. It has been scheduled for review by the development team that will get back to you should there be questions.
(Please note that as we are user-driven we can't guarantee that your request will be met unless it gets many votes and/or fit the product vision)
Read more about the Feature Request process here
[Internal Id: 46645] -
The is no official way but guess you could do the following:
- In the macro save you needed values in the @STORE system
- Then in the Dynamic code call "string value = UniversalFunctions.Functions.Macro.Scripter.Control.DataStore.GetValue("STORE1");" to get the value -
Dear Jensen,
Thank you very much for your answer!
I found and the way to read he @STORE1 value in Dynamic code using "string value = "@STORE1";" code. Is this way correct?
Thank you,
Panagiotis -
I actually did not think
string value = "@STORE1";
would work... but if it works it works :-)
-
Yes, @STOREs works perfectly. I've been using them for years.
You can also create an UDO with fields for your parameters, remove Add button and create a new button where you would Trigger the custom code. Then, you can get fields values that would be your parameter.
-
Thank you very much for your responds Eduardo and Rasmus!
Please sign in to leave a comment.
Comments
6 comments