cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Edit OnSelect ThisItem

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
Highlighted
Anonymous
Not applicable

Re: Edit OnSelect ThisItem

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

 

Highlighted
Community Support
Community Support

Re: Edit OnSelect ThisItem

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

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,571)