Hi, I can't seem to get a script output into my Low Code app. I'm following dynamically inject the output of the script. and looking at previous answer Feed Output text from Automation Script to Text Input - DataMiner Dojo but I can't get it to work. It's working fine when triggering from Visio in Cube.
I have the following in my script
In my app Button 1 triggers the script from within page scriptOutput but the HTML box in the app isn't recognising the HTML code.
Great thanks, I've just added a script to a system running the supported version with simply the following;
engine.AddScriptOutput(UIVariables.VisualOverview.CreateKey("MyOutput"), "Working");
Should this now be working because it's not populating anything?
Will try, thanks you for all the help!
Is there any more documentation on the possible variables for all of this feature? I don’t think I would have come to find adding UI.VO. on my own, thanks again!
Hi Ross,
The ‘UI.VO.’ prefix comes from your code itself, it is not related to the script output or feed linking features. The method used to add a script output expects 2 string values, it does not modify them (https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Automation.IEngine.AddScriptOutput.html?q=addscriptoutput). Your prefix was added because you used the result of ‘UIVariables.VisualOverview.CreateKey(“MyOutput”)’ as a key, resulting in ‘UI.VO.MyOutput’.
Thanks, that all makes sense.
I’ve noticed in Cube when I output a string builder using this method it keeps the formatting, particularly, it retains the n I have for new lines. In the LCA this info isn’t held and it dumps all of my output into one long string. Do you know of a way to keep the format in the LCA web component?
Hi Ross,
The feed linking feature looks available now. The issue you are probably having now is that you are setting the script output incorrectly. The code should be: ‘engine.AddScriptOutput(KEY, VALUE)’ where the KEY should be the last part of the feed link (here ‘MyOutput’) and VALUE should be the desired value. In your setup the key is not ‘MyOutput’, but ‘UI.VO.MyOutput’ because of the CreateKey call.