Hello,
Lately we´ve been building a definition with several script rules inside. Most of them work with external datasource connection strings to the same db. My question is: ¿does flexicapture allows or supports somehow using global variables (for the connection string for example) wich could be used by any rule?
Thanks anyone for the help!
Comments
4 comments
Hello,
Please use the Environment variable for this purpose. More details about it you may see in the “Environment variables” article in the Developer Help
Hi.. thank you for taking the time to answering..
i createad an ADO string connection EV. (as you can see in the attached image)
but. i´m kinda newby on this so i haven´t been able to call that EV in my script rule ..
i would be very thankful with you if you could take a look to the attached file where i explain how i am actually connecting to my data source. the idea is to " replace" all that connection parameters with the EV. i just dont get how to do it.
Thank you for your help!
Hello,
The Environment Variables are also available on the level of IProject, so you may call them as
var testCon = FCTools.ScriptContext.Project.EnvironmentVariables.Get("test_con");
in the rules
or
var testCon = Document.Batch.Project.EnvironmentVariables.Get("test_con"); in document processing scripts
Yeap! i tried that code and worked just perfect
Thanks 4 ur help!!
Please sign in to leave a comment.