Hi all,
I have a form connected to a SQL datasource, 1 gallery that you select an grouped list of items and a 2nd gallery that is displaying the items that are associated with the selected item in the first gallery.
When I hit Submit on the form, it's auto-selecting the first item in the first gallery and displaying it instead of staying on the selected item that just got submitted.
I tried setting a global variable to the record selected in the first gallery, but the property I would need to have it re-select isn't an option in the Gallery1.Selected.(properties), I presume because i'm doing a groupby?
On my OnSuccess of the form, I have it set to "false". How do I make Gallery1 stay on the selected item when the form is submitted?
Thanks!
Hi @RezaDorrani ,
related to this topic, if I have a Table from witch I select a line, not a gallery, how can I declare that ID var ?
once in the form, I submit some info ( like start of the job ), I stay in the form by having the OnSuccess to blank, but the selected info from the from become the first item from the list.
Thanks
Hi @RezaDorrani, thanks again, that got me further, and I think I just realized what my primary issue is. The gallery I select that controls the form is filtered based on a specific value in that form. When I change that value, it also updates my collection populating the gallery which removes the record from the collection. Therefore, there's no way for that item to remain selected because it's gone out of the collection, so it's automatically selecting the first record because the last selected isn't available anymore. I'm wondering now if there's a way to automatically select the next record in the gallery instead?
Thanks
Hi @russrimm
You can also trigger the setting of that variable when the item is selected in the gallery
OnSelect of gallery item - Set the variable
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
@RezaDorrani wrote:Hi @russrimm
When you navigate to the screen which shows the form (
The Item property of the form would probably be Gallery.Selected
OnVisible of the screen which has the form , do Set(varForm,Gallery.Selected) and replace the Item property with varForm
Next once form is submitted, OnSuccess property of the form do
ViewForm(formname) - or EditForm(formname)
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Hi @RezaDorrani thank you for that. In my case, I have both galleries and the form on the same screen. Gallery1 is showing a groupby of the datasource to show only a list of people's names, and Gallery2 is showing a Filter of the datasource, using the name of the person selected in Gallery1 for the filter. If I change the Item of the gallery to a variable, I get in a bit of a catch 22 as I can't use OnVisible because it's all on one screen. Is my only option to split it into two screens so I can leverage OnVisible for setting the variable?
Thanks!
Hi @russrimm
When you navigate to the screen which shows the form (
The Item property of the form would probably be Gallery.Selected
OnVisible of the screen which has the form , do Set(varForm,Gallery.Selected) and replace the Item property with varForm
Next once form is submitted, OnSuccess property of the form do
ViewForm(formname) - or EditForm(formname)
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional