Hi
I have this code Set(VarMode, "Edit"); Select(Parent); Navigate('Update Escalation Report') which on two galleries. The first gallery works fine but the other doesn't pull through the data.
How can I have two galleries (same data) pulling into one edit form?
The difference between the two galleries is the items shown. So I have an admin gallery that shows all records and the other is user-based only.
Solved! Go to Solution.
What is the Item property of the form set to? That's what determines what is shown in the form. I suspect that your item property is set to only reference one gallery like
Gallery1.Selected
What you need to do is add something to the navigation that uses an UpdateContext to set a variable to the record and then set the Item property of the form to point to the variable. Like this
Set(VarMode, "Edit"); Select(Parent); Set(selectedRecord,Parent.Selected), Navigate('Update Escalation Report')
Then set the item property to selectedRecord
What is the Item property of the form set to? That's what determines what is shown in the form. I suspect that your item property is set to only reference one gallery like
Gallery1.Selected
What you need to do is add something to the navigation that uses an UpdateContext to set a variable to the record and then set the Item property of the form to point to the variable. Like this
Set(VarMode, "Edit"); Select(Parent); Set(selectedRecord,Parent.Selected), Navigate('Update Escalation Report')
Then set the item property to selectedRecord
You want to connect 2 Galleries to an Editform:
Assuming you have Gallery1 And Gallery2.
Insert a Button and Onselect put:
UpdateContext ({Gal1:!Gal1})
Then on the Items property of the Edit form put:
If(Gal1, Gallery1.Selected, Gallery2.Selected)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi,
I added your code to the Onselect property of the gallery. Is this correct? However, selectedRecord doesn't work when I change the item property of the form?
Thanks,
Hi @Pstork1
This worked however, I used this due to a slight typo:
Set(VarMode, "Edit"); Select(Parent); Set(selectedRecord,Parent.Selected), Navigate('Update Escalation Report')
Set(VarMode, "Edit"); Select(Parent); Set(selectedRecord,Parent.Selected); Navigate('Update Escalation Report')
you used ',' instead of ';' after the set selected record variable.
Thanks,
Sorry. Too early and not enough coffee yet. 😁
User | Count |
---|---|
183 | |
106 | |
89 | |
44 | |
43 |
User | Count |
---|---|
226 | |
108 | |
106 | |
68 | |
67 |