How to get the value of a property in an extension from a function to the main code?
var MyObj = {MyVar:0};
var CurrentDocument = Qv.GetCurrentDocument();
CurrentDocument.GetAllVariables(function (vars) { for (var i = 0; i < vars.length; i++) { if (vars[i].name === "MyVariable") { MyObj .MyVar= vars[i].value; break; }; };
alert(MyObj .MyVar); //Work
};
alert(MyObj .MyVar); //Undifined
Option with definition below do not offer. Firstly, it does not work in document extension. Secondly, when changing the xml, you need to delete and recreate the extension in the document each time. It came up with an idiot.
@warfollowmy_ver Hi there, thanks for participating in the community. We are reaching out to someone for help, I hope they will be able to get the post soon. Thanks for your patience.
Did you find a solution to your question? Mark the solution as accepted : and if you found it useful, press the like button!