cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Edit OnSelect ThisItem

Hi,

 

In one of my apps i have a gallery where the user can select previous entries and view the detailscreen, the edit button however does not work (EditForm1) as their is no form its all on the canvas (for offline capability) can anyone tell me the OnSelect code would be if i configure my apps this way?

 

Thankyou

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about your issue?

Do you mean that the selected item in your Gallery could not be displayed well in your Edit form1?

 

I have made a test on my side, and don't have the issue that you mentioned. Please check if you have connected the Item property of the Edit form1 to the selected item in your Gallery. In other words, please make sure that the Item property of the Edit form to following:

Gallery.Selected

Set the OnSelect property of the Edit button in your Gallery to following:

EditForm(EditForm1);
Navigate(EditScreen, ScreenTransition.None)

 

Please also consider take a try with the following workaround:

Within your Gallery, set the OnSelect property of the Edit icon button to following:

EditForm(EditForm1);
Navigate(EditScreen, ScreenTransition.None, {CurrentSelectedItem: ThisItem})

Within your Edit screen, connect the Edit form to your data source, then set the Item property of the Edit form (Editform1) to following:

CurrentSelectedItem

Or

Set the OnSelect property of the Edit icon button to following:

Set(CurrentSelectedItem, ThisItem)  /* <-- or type  Set(CurrentSelectedItem, Gallery.Selected) */
EditForm(EditForm1); Navigate(EditScreen, ScreenTransition.None)

Within your Edit screen, connect the Edit form to your data source, then set the Item property of the Edit form (Editform1) to following:

CurrentSelectedItem

Note: I assume that the Edit button existed within your Gallery

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

 

make a button or a icon in your gallery for the item and insert the following code in the OnSelect property

 

Set(SelectedItem,ThisItem);Navigate(detailscreen,None)

then you can select the item via SelectedItem.Cost for eg. in your detailscreen

 

Best regards

Vasii

 

v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about your issue?

Do you mean that the selected item in your Gallery could not be displayed well in your Edit form1?

 

I have made a test on my side, and don't have the issue that you mentioned. Please check if you have connected the Item property of the Edit form1 to the selected item in your Gallery. In other words, please make sure that the Item property of the Edit form to following:

Gallery.Selected

Set the OnSelect property of the Edit button in your Gallery to following:

EditForm(EditForm1);
Navigate(EditScreen, ScreenTransition.None)

 

Please also consider take a try with the following workaround:

Within your Gallery, set the OnSelect property of the Edit icon button to following:

EditForm(EditForm1);
Navigate(EditScreen, ScreenTransition.None, {CurrentSelectedItem: ThisItem})

Within your Edit screen, connect the Edit form to your data source, then set the Item property of the Edit form (Editform1) to following:

CurrentSelectedItem

Or

Set the OnSelect property of the Edit icon button to following:

Set(CurrentSelectedItem, ThisItem)  /* <-- or type  Set(CurrentSelectedItem, Gallery.Selected) */
EditForm(EditForm1); Navigate(EditScreen, ScreenTransition.None)

Within your Edit screen, connect the Edit form to your data source, then set the Item property of the Edit form (Editform1) to following:

CurrentSelectedItem

Note: I assume that the Edit button existed within your Gallery

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,340)