I have a form that gets populated with a gallery selection. This all works great. What I want to be able to do is show the data populated in two of the data cards outside of the form in labels. How do I do this?
More detail
The form is showing the end user marketing campaign information. The two data cards in question contain a URL and campaign name. Both these values are used by the end user. They copy and paste them into their marketing platforms. My initial thought to make the process easy was to add a button or icon and use the Copy() function to grab the data. The problem is that the form is in view mode unless they hit the edit button. Because the form is in view mode you can't click any buttons in the form. Toggling the form to edit mode just to click a copy button is not user friendly. The idea is grab this data and put(copy) it outside of the form so they can use a copy button at all times.
Yes, that would also work. That shows in the Label as soon as the gallery is selected. The Copy function also saves the text to your clipboard.
I thought you wanted it to show in the labels when the copy button is pressed (my first post).
Please tick Accept as solution if the answer is useful.
Thanks,
Thanks. I'm not setting the form with the gallery at all using OnSelect. I am setting the Items property of the form to Gallery.Selected.
This solution actually gave me an idea to try something. Instead of fiddling with the form why not us the OnSelect of the gallery item to set the variable like this:
UpdateContext({varFullURL: ThisItem.'Full URL'})
This seems to work well. It populates whenever a gallery item is selected. Then I can add a copy icon/button and add this code its OnSelect:
Copy(varFullURL)
See any drawbacks to this approach?
Hi @futr_vision
I assume you currently populate your form by doing something like in the OnSelect property of the gallery:
Set(varRecord, ThisItem);
Then the Items property of your form you have:
varRecord
To copy data from the form (in view mode) using a button, create a new variable in the OnSelect property of the button:
Set(varRecordURL, varRecord.URL);
Then for your label control Text property:
varRecordURL
Please tick Accept as solution if the answer is useful.
Thanks,
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2