Hi everyone,
So I looked everywhere for an answer to my problem and couldn't find any.
I have 2 galleries with the same data source
From these 2 galleries, I navigate to a common detail screen with this formula and it works great, it doesn't matter from which gallery I am coming from, it displays the correct detail screen
Nextarrow.onselect = Navigate(SuiteInfo, ScreenTransition.None,{variable: 1}) and so on for every arrow in every gallery
Detailform.item = If(variable=1,BrowseGallery1.Selected, variable=2,BrowseGallery1_1.Selected, variable=3,BrowseGallery1_2.Selected,variable=4,BrowseGallery1_3.Selected, variable=5,BrowseGallery1_4.Selected, variable=6,BrowseGallery1_5.Selected,variable=7,BrowseGallery1_6.Selected, variable=8,BrowseGallery1_7.Selected, variable=9,BrowseGallery1_8.Selected,variable=10,BrowseGallery1_9.Selected, variable=11,BrowseGallery1_10.Selected)
Then from this detail screen, I want to navigate to an edit form of this record, I tried to put the same formula on the item property of my editform but I keep getting an error "Invalid argument type".
Hope I was clear enough, and thanks in advance for the help!
Solved! Go to Solution.
Instead of passing one variable that will be used in the details screen to choose from which gallery you want to select the form Item property, you can pass the item itself from the gallery. Then, from the details screen, you can pass that item that was passed along to the edit screen.
The blog post at https://blogs.msdn.microsoft.com/carlosfigueira/2017/10/04/decouplingbrowsegalleryfromforms/ talks exactly about this scenario, and it has detailed steps to make that happen.
Hope this helps!
Instead of passing one variable that will be used in the details screen to choose from which gallery you want to select the form Item property, you can pass the item itself from the gallery. Then, from the details screen, you can pass that item that was passed along to the edit screen.
The blog post at https://blogs.msdn.microsoft.com/carlosfigueira/2017/10/04/decouplingbrowsegalleryfromforms/ talks exactly about this scenario, and it has detailed steps to make that happen.
Hope this helps!
Thanks Carlos ! However it is still not working, again from the galleries to the display screen everything is fine, but it doesn't work from the display screen to the edit screen
editicon.onselect = EditForm(EditForm1);Navigate(SuiteInfoEdit,ScreenTransition.None, {editItem:item})
I get that error message : Invalid name
and
Editform1.item= editItem
I get that error message : The property expects Record values, but this rules produces incompatible Error values
It seems fine to me though, I don't get it ... Thanks again
Nevermind I figured the error in the link you provided.
The editicon.onselect property should be
= EditForm(EditForm1);Navigate(SuiteInfoEdit,ScreenTransition.None,{editItem:displayItem})
and not {editItem:item}
Thanks again !
Thanks for letting me know, I've updated the post with the correction!
The process in your blog works well but can you please give an example of how to navigate back to the browse screen after a successful edit or new item?
Currently after an edit you are taken to the detail screen but the back arrow from there takes you back into the edit screen.
Thanks.
Sorry @CarlosFigueira , Ignore me!
EditForm1.OnSuccess simply set to back() and not Navigate(DetailScreen1, ScreenTransition.None, {displayItem:EditForm1.LastSubmit}) acheives what I need.
@agmrd wrote:Nevermind I figured the error in the link you provided.
The editicon.onselect property should be
= EditForm(EditForm1);Navigate(SuiteInfoEdit,ScreenTransition.None,{editItem:displayItem})
and not {editItem:item}
Thanks again !
Hi @agmrd
Could you share more detail about the formula and the 2 gallery items?
I have the exact same problem, which is i want to displaying and edit the records in one form from 2 different gallery.
Can you help me?
Thanks,
pytbyt
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
182 | |
94 | |
62 | |
60 | |
58 |
User | Count |
---|---|
246 | |
165 | |
91 | |
76 | |
73 |