Hello Community,
I have created a form that gets data from dataverse table and I have two buttons(Save and Submit). Both buttons submit the form. The thing I want is if the user opens the form again after submitting it through the save button, the form mode should be edit for editing purposes, and if the user opens the form after submitting it through submit button, the form mode should be ViewForm. Any solution to it will be appreciated
Solved! Go to Solution.
We need to store some value to know what action the user has performed. For example, When the user clicks the Submit button, you need to patch (Update) the one more field to store another value so that form can use that field later on.
Example of your Submit button. Set OnSelect of the Submit button
Set(SavedRecord,SubmitForm(FormName));
If(
IsEmpty(Errors(TableName)),
Patch(TableName),SavedRecord,{
prefix_issubmitted:true
});
Notify(
Concat(Errors(TableName), Column&": "&Message),
NotificationType.Error
)
)
Note: In this example field name "prefix_issubmitted"
Set the DefaultMode of the form to
If(
Text(DataCardValue10.Selected.Value) = "Yes",
FormMode.Edit,
FormMode.View
)
We need to store some value to know what action the user has performed. For example, When the user clicks the Submit button, you need to patch (Update) the one more field to store another value so that form can use that field later on.
Example of your Submit button. Set OnSelect of the Submit button
Set(SavedRecord,SubmitForm(FormName));
If(
IsEmpty(Errors(TableName)),
Patch(TableName),SavedRecord,{
prefix_issubmitted:true
});
Notify(
Concat(Errors(TableName), Column&": "&Message),
NotificationType.Error
)
)
Note: In this example field name "prefix_issubmitted"
Set the DefaultMode of the form to
If(
Text(DataCardValue10.Selected.Value) = "Yes",
FormMode.Edit,
FormMode.View
)
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
181 | |
46 | |
46 | |
34 | |
33 |
User | Count |
---|---|
259 | |
87 | |
79 | |
68 | |
67 |