cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

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
Community Support
Community Support

Hi @shaneOZ ,

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 @shaneOZ,

 

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

 

Community Support
Community Support

Hi @shaneOZ ,

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

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (35,918)