Is the local variable scope in a screen does not exist in the Data action?

I have a local variable with API Request attribute, I need to assign API key value from site property. It seems I cannot assign in the Data action flow as the local variable is not visible inside the Data action. Is there any other way I can do this?


Hi Bangari,

Whatever you want to make available to your screen from inside your data action : add it as output to your data action.

In your screen, you can then reference it as such in expressions or widgets, or if you really feel like having it as a local variable, you can add an onAfterFetch to the data action, and copy the information coming from the data action into the local variable.

Good luck,


Oh, and to reply to the title of your question, you can reference local screen variables inside the data action, not change them.


Hi Bangari,

You should use the output parameter of your Data Action to pass on values to the scope of your screen. 

In the On After Fetch event of the Data Action you can assign the output value from your Data Action to a local variable that exists inside the scope of your screen. 

Hope this helps.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.