Hi,
I am new to powerapps, I created a form and once it is submitted need to store the status as "New" in sharepoint, If any changes in the form then status changes to "Draft" and finally approved once from is approved.
Please let me know how to achieve it.
Greetings!
Well, there are various ways you can achieve this . . . First, you should lock the Status datacard related to it's sharepoint column locked and set it's value to "New" with PowerFx formulas. Then assuming you are going to use the same form to edit the values, you can make an IF statement with PowerFX to look if it's current value is "New" to change it to "Draft". For the approval it's a bit more tricky, since you would have to either allow someone to manually select "Approved" or check if everythign is as it should, and set it to Approved. . .
While this may seem kind of hard at first it is not nearly as complex, and should you require a more indepth explanation, just feel free to reply!
Edit1: Here you would have a form in New mode, which would be to create a new record, and in the default datacard of the STATUS column I have an IF statement, to set it to new if it's blank, which would be that way everytime you open a form. Then I just set the Display mode of that same datacard to disabled That way you achieve the first step!
Edit2: Here you would have the form in edit mode where you are editing an already existing record, here we modify the Default formula we just put, to check if the record has "New" in it, after checking if it's blank, and if it is "New" set it to "Edit" (You can put draft or whatever you need in it!). And thus you achieve your result easiliy within PowerApps!
Now for the third iteration in which someone can approve it, you would have to enable the datacard to let someone manually input "Approved", or think of a complex IF statement to check whatever variables you see fit, before setting the default to "Approved".
Hopefully this has helped you, but should you need more, feel free to reply!