cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Kudo Kingpin
Kudo Kingpin

Set(VarRecord, This Item) to Replace BrowseGallery1

Hi community.

 

I was checking a video from Shane Young

 

And he mentioned that is better to start replacing the onselect = Navigate......... 

by:

Set(varRecord, ThisItem);Navigate......

then in the target form items = VarRecord

 

Basically replacing Gallery1.selected.

 

He said that this method is better and secure.

 

Now my question is?

I did that and my target form is a form. After press to EDIT the form and save the changes the updates didn't come up. I have to go back select the item again and after that I can see the changes.

 

How can I fix this? I have tried Refresh etc but nothing works.

 

Thanks in advance,

 

Regards,

 

 

15 REPLIES 15

I am using the Set(varRecord) for navigation also. It was working yesterday, but now my Patch statement to update my form (see OnSuccess below) is no longer working. Not sure what happened, nor how to resolve it. 

 

Kathomsen_0-1594313678287.png

Kathomsen_1-1594313775780.png

 

 

@Kathomsen 

This should really be posted as a new question, you will find more people to help you.

 

Before then though, you could try

1. Wrapping your User().Email in the Lower() function, and 

2. Make sure you are using the correct variable for your Items property of the Form. There are two there ie varrecord and varRecord. If the variable schema doesn't match then you'll get an error. If you have the correct variable, try removing the commented code

 

Try these, if no success please post to the main forums page.

sajarac
Kudo Kingpin
Kudo Kingpin

Hi @Shanescows, would you mind to update your video about this feature? For years PA told us that the way to do it is GalleryBrowse.Selected.......

 

 

Hi @sajarac ,

 

BrowseGallery1.selected will give you the selected record of the gallery however it will create the dependency of the previous screen when you move out of the screen so it is always a good idea to set the selected record to a variable and use that varaiable the following screen.

 

Again, there is nothing wrong but it will pull down the performance of the APP.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Thanks! I understand what you're saying about posting as a new question. Appreciate the tips.

 

 

Hi @v-xida-msft ,

 

In regards of this: ".

Have you solved your problem?

 

Based on the issue that you mentioned, I think this issue is related to the varRecord variable. If you update the selected record using your Edit form, you should also update the varRecord variable to the updated record simultaneously, otherwise, this varRecord variable would still store previous record........."

 

I still having issues. Now I am trying to define a variable for the OnSelect property of my gallery1.selected. But the variable is storing the previous record.

 

This is what I am trying to set as variables:

Set(varCustomerName,Gallery1.Selected.Title);
Set(varSAPNumber,Gallery1.Selected.Quote);
Set(varCustomerID,Gallery1.Selected.ID);
Set(varCustomerContract,Gallery1.Selected.Contract);
Set(varCustomerState,Gallery1.Selected.StateQuoted);

 

Could you please give me some help here?

 

I am trying to consume those variables in the next screens.

 

Thank you kindly

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,339)