コミュニティ

using global variables 回答済み

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!

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

4件のコメント

  • Avatar
    Permanently deleted user

    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

    0
  • Avatar
    Permanently deleted user

    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!

    0
  • Avatar
    Permanently deleted user

    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

    1
  • Avatar
    Permanently deleted user

    Yeap! i tried that code and worked just perfect

     

    Thanks 4 ur help!!

    0

サインインしてコメントを残してください。