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 editing
Form with ID 2 in Edit mode, changed the number 55 to 66 and the button SØ to SV
Note ID 2, no change to Kvadrant
ID 2 in edit mode again, description is gone and Valgt rute has been updated to SV
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...
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional