Hi PA veterans,
I have a series of onStart global variables coded in the following fashion:
Set(varClientName, "");
Set(varClientEmail, ""); etc
I want to click the 'Show Info' button and see the the value of varClientName on the label. For testing purpose, I've created a label to check if the value is returned correctly (original gallery.selected value vs. the variable value). However, the value of varClientName 'John Smith' will only appear on the second click. This is the same for all my other variables. May I know where I've done wrong and how to fix it?
Thank you in advance.
Solved! Go to Solution.
@Australia correct
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Have you tried closing and re-opening the App? I tried this on my side exactly as you described and I can't reproduce your issue.
@Australia Did it re-opening the app solved your issue
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@PowerRanger Thanks for the help. 🙂
I might have finally figured it out. I think I have too many set variables in the OnSelect of the button so I used the 'Concurrent' function to bundle all the set variables and it appears to have worked. 🙂
e.g. Concurrent(
Set(galClientName.Selected.ClientName.DisplayName,varClientName),
Set(galClientName.Selected.ClientEmail.Email,varClientEmail),
......
);
Hope this post helps anyone who have experienced similar issues in the future.
@Australia is there a specific reason why you store each value in a single variable?
Why don’t you save the complete record into a single variable?
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@PowerRanger because I am an amateur... 😂 Could you kindly teach me how I can save the complete record into a single variable? Let me know if I need to update the OnStart global variables, too. 🙂
@PowerRanger hi again, no unfortunately. I tried multiple times, re-starting the app did not solve the issue.
You could just write
Set(varSelectedItem,galClientName.Selected)
This will save the entire record in a variable and you can reference it anywhere you want. This formular could be used in the OnSelect property of your Gallery. In That case (using theOnSelect Property of your Gallery) you could even say
Set(varSelectedItem,ThisItem)
So now, on a label Text-Property you could say e.g.
varSelectedItem.ClientName.DisplayName
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@PowerRanger Wow amazing!
So just to confirm here is what I need to do:
1. App OnStart - do nothing
2. Gallery OnSelect - Set(varSelectedItem,ThisItem)
3. Button OnSelect - Set(varSelectedItem,galClientName.Selected)
4. Label Text - varSelectedItem.ClientName.DisplayName or varSelectedItem.ClientEmail.Email or varSelectedItem.ClientPhone so on and so forth?
@Australia correct
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
159 | |
85 | |
68 | |
63 | |
61 |
User | Count |
---|---|
209 | |
150 | |
93 | |
81 | |
68 |