cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
calvares
Impactful Individual
Impactful Individual

Issue with form not setting to New mode and 'getting your data'

In my app, when the user clicks on 'Add a new Biosafety form', the OnSelect is Set(varFormMode, FormMode.New).

On the screen they navigate to, there are 3 forms they navigate between: User Information, Sample Information and Protocol Information. The DefaultMode of all three forms is set to varFormMode. When navigating between User Information and Sample Information a few users are getting this screen:

calvares_0-1645715787313.png

The screen title in the top left is:

If(varFormMode = FormMode.New, "New Biosafety Form", "Edit Biosafety Form"), which tells me that the form thinks it is in edit mode, when it should be in new.  

I am unable to replicate this error. It seems to be occurring to certain users, no matter which browser/device they are using.

The data source is SharePoint and I have checked their access level there. I've also made sure there is no where else where the varFormMode is updating to edit. When navigating between forms, the OnSelect only updates context variables which are used for the OnVisible property of the forms.

Is there anything else I might be missing?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
calvares
Impactful Individual
Impactful Individual

So the issue was that there were two OnSelect formulas - one when clicking on the wording and one for the arrow.

If clicking on the wording the formula was different - it was NewForm(FormBiosafety) rather than using varFormMode, which meant the second form didn't know what mode it was meant to be in. The solution is to update the formula so it declares the form variable.

View solution in original post

3 REPLIES 3
BrianS
Super User
Super User

It appears that using that Set statement it assigns either 0 or 1 depending on the mode you select. I would try replacing that with "regular" Boolean logic and see if the problem persists. Set the varFormMode to true then use If(varFormMode, FormMode.New,FormMode.Edit) in the Display mode for the form and see if the problem persists.

calvares
Impactful Individual
Impactful Individual

Thanks for the suggestion @BrianS. I've updated the form and I'm waiting for feedback from testing. 

calvares
Impactful Individual
Impactful Individual

So the issue was that there were two OnSelect formulas - one when clicking on the wording and one for the arrow.

If clicking on the wording the formula was different - it was NewForm(FormBiosafety) rather than using varFormMode, which meant the second form didn't know what mode it was meant to be in. The solution is to update the formula so it declares the form variable.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (4,725)