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.
Hi Ross,
Looking at the screenshot you provided of the LCA, I notice that there is no highlighting in the HTML input and that the Web component shows the feed link as plaintext. Could it be that you are running a DataMiner version < 10.3.0 [CU14]/10.4.0 [CU2]/10.4.5? The feed linking feature is not available in older versions of DataMiner. You can check this by clicking your user icon > about > web version.
Hi Ross, 10.3.12[CU0] does not include this feature. It is available from the versions mentioned in my answer (10.3.12[CU0] is older than 10.3.0[CU14])
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?
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.
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, yes I should have added we’re on 10.3.12 (CU0)