Hi @Anonymous ,
Do you want to make a record non-editable by clicking "submit" button?
Since you may create multiple records, so using variable is not enough.
I suggest you use collection or insert another column to mark the records that you've selected "submit".
1)use collection
You could set the submit button's OnSelect:
SubmitForm(Form1);Collect(collection,{record_id:Form1.LastSubmit.Id})
set the save button's OnSelect:
SubmitForm(Form1)
set the save button's Visible:
If(ThisItem.Id in collection.record_id,false,true)
set the edit button's Visible:
If(ThisItem.Id in collection.record_id,false,true)
//if the record id is in the collection, then the record has been submitted. Then edit button and save button will both become invisible.
2)insert another column
You could set the submit button's OnSelect:
SubmitForm(Form1);Patch(datasource,Form1.LastSubmit,{new field:true})
set the save button's OnSelect:
SubmitForm(Form1);Patch(datasource,Form1.LastSubmit,{new field:false})
//the submitted record's new field value is true, others are false
set the save button's Visible:
If(ThisItem.new field=false,true,false)
set the edit button's Visible:
If(ThisItem.new field=false,true,false)
//If the record's new field value is false, then the record has not been clicked "submit". These two buttons will be visible.
Best regards,