cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ErikKjellman
Frequent Visitor

Changes in unrelated fields deletes text field when editing form

I have a form with several fields. One is a description field and another one is a button controlled variable selection. There are four buttons that toggles the value for a datacard (button 1 = southwest, button 2 = northwest and so on). When I use the form in edit mode for existing objects, something weird is happening. If I change the variables using the buttons, the field where the variable is suppose to go is unchanged, but a second field which is populated from said field is updated. Also, the description is deleted, unless I also add a change to the description (any change will do).

 

My OnSelect in the Gallery view of the form is

Set(varMode;"Edit");; Navigate([@graveskjema_rediger];ScreenTransition.UnCover)

 

My OnSuccess for the form is 

Set(CurrentSubmittedRecord; graveskjema_rediger_form.LastSubmit);; NewForm(graveskjema_rediger_form)

 

My OnSelect that submits the form is

If(varMode = "Edit"; SubmitForm(graveskjema_rediger_form);;Navigate(graveskjema_vis); SubmitForm(graveskjema_rediger_form))

 

I have no idea where to start my debugging on this problem as the app is starting to get more and more complex. Any suggestions?Note ID 2 before editingNote ID 2 before editingForm with ID 2 in Edit mode, changed  the number 55 to 66 and the button SØ to SVForm with ID 2 in Edit mode, changed the number 55 to 66 and the button SØ to SVNote ID 2, no change to KvadrantNote ID 2, no change to KvadrantID 2 in edit mode again, description is gone and Valgt rute has been updated to SVID 2 in edit mode again, description is gone and Valgt rute has been updated to SV

1 ACCEPTED SOLUTION

Accepted Solutions
ErikKjellman
Frequent Visitor

So the solution to my problem was simple; I had the column setting for the description set to add changes to existing text, leading to multiple lines of formatted text, which the powerapps form could not read. 

 

I also solved the Kvadrant variable issue by moving the variable out of the form and set it as a global variable, with some reset function on the forms on start if in edit mode, to avoid the impression that the button selected was in fact the selected button. Also , I couldn't get my head around how to set the global variable based on the current selected item if in edit mode...

View solution in original post

1 REPLY 1
ErikKjellman
Frequent Visitor

So the solution to my problem was simple; I had the column setting for the description set to add changes to existing text, leading to multiple lines of formatted text, which the powerapps form could not read. 

 

I also solved the Kvadrant variable issue by moving the variable out of the form and set it as a global variable, with some reset function on the forms on start if in edit mode, to avoid the impression that the button selected was in fact the selected button. Also , I couldn't get my head around how to set the global variable based on the current selected item if in edit mode...

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.

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.

Users online (1,724)