I am using the one editform for new items and editing older records.
When the form is a new item, the flag (column) on the list is 0 (by default) then the form captures the users Name and email.
On submit it sets this flag to = 1 - that is the plan.
So that if the record is in edit mode and the record is to be updated it will not recapture the Name and email on opening - the original is shown.
If(ThisItem.Flag = 0 And EditForm1.Mode=FormMode.New,User().Email, ThisItem.PreparedBy)
If(ThisItem.Flag = 0 And EditForm1.Mode=FormMode.New,User().FullName, ThisItem.PreparedBy)
Both these work - which surprised me as it was a stab in the dark to code it from an example or two.
Is there a way of adding to the function - Submit - to set a flag (column to 1)
I have tried this (following) only on the OnSelect Action - but get an eror warning icon.
ThisItem.Flag = 1 AND SubmitForm(EditForm1)
Trying to replicate InfoPath where on submit you set a rule etc.
Or should I create a rule that says something like if Flag = 0 then set flag =1 then submit.
Now how do I do that? - mmmmmmmmmmmmmmmmmm
Suppose other option is to create two edit forms - One for new one ofr edit record - but then still would have same problem of setting the Flag on submit.
Solved! Go to Solution.