Variables from Dynamic Code to UF Answered

Hello, is it possible to send data from the .net SDK universal function to Makro? I have the following code 
string test = "test123";
                        
string universalFunctionToRun = "UF-121";
System.Threading.Thread.Sleep(1000);
UniversalFunctions.Module.ActivateUniversalFunction(SBO.AddonLogic.Addon.AddonData, activeForm, universalFunctionToRun, test);
and I want to read the test variable in the macro

Comments

3 comments

  • Comment author
    Thomas
    • Official comment

    Hi Marek,

    It might be possible with this unofficial call, but something you need to test: 
    UniversalFunctions.Functions.Macro.Scripter.Control.Update("STORE1","myValue");

    Then access the STORE value in the macro as usual.

    If that doesn't work, then it's unfortunately not possible. I will move this from the DRQ section to the questions and answers.

    Best regards,

    Thomas
    Product Owner

  • Comment author
    Marek Panasiewicz
    I have a problem 
    Line: 123 - Type or namespace name 'Update' does not exist in namespace 'UniversalFunctions.Functions.Macro.Scripter.Control' (are there any missing instructions for the assembly?).
    0
  • Comment author
    Keshava Best

    Hi Marek,

    This might be possible with the .NET Snippet
    https://help.boyum-it.com/B1UP/index.html?dotnetsnippet.html

    Otherwise, you can create a hidden field on the current form, set the value from Dynamic Code and have the macro read from this field.

    Keshava

    0

Please sign in to leave a comment.