Global variables not set


#1

Hello.
I’m experiencing a problem. I set a global variable when I change from one page to other. However, when I upload the second page the variable is not set on the new page…I’ve followed the tutorials but didn’t have any luck. Can you help me, please? Thanks.
António.


#2

Not completely sure without seeing your file, but a couple of reasons for this might be…

  • In the “interactions” panel, you’re setting the variable value after navigating to the new page—since the act of navigating to the new page prevents any further actions from completing, the value will never be set.
  • sometimes this happens if you’re previewing new pages locally. Try saving the file and re-opening it and see if the problem persists.

Feel free to post your RP file if you keep seeing this problem.


#3

Hello
Thanks for your reply. Here goes the rp file. The global variables are “VAT” and “clientname”. They are set on page “Entidades” when I click on the eye icon. Then I go to Entidades-Detalhe page where I set the text in the fields “VATNumberTextInput” and “ClientNameTextInput”. But the variable value doesn’t appear on the fields.
Thanks
AntónioPrimeFoods1.0.rp (4.0 MB)


#4

Yep! You need to set the variables before navigating away from the page:

After making that change, it seems to work the way you want.

PrimeFoods1.0.rp (4.0 MB)


#5

Yes of course! It makes sense!
Thanks!


#6

You are most welcome!
you-are-most-welcome-sir


closed #7

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.