Dear All,
I have the following scenarios:
a)
1. The user add an attachment in a powerapps form
2. The status should change to Pending
b)
1. The user delete the attachments
2. The status should change to Draft
How can I put the above situations in a formula?
I have tried this formula, but if the user add an attachment, the status is still on Draft.
Refresh('LABELS - SUPPLIERS RAW MATERIALS');SubmitForm(FormLabel);
If(
CountRows(DataCardValue14.Attachments) <1,
Patch(
'LABELS - SUPPLIERS RAW MATERIALS',
FormLabel.LastSubmit,
{CheckedByIPRA: {Value: "Draft"}}
)); If(
CountRows(DataCardValue14.Attachments) >0,
Patch(
'LABELS - SUPPLIERS RAW MATERIALS',
FormLabel.LastSubmit,
{CheckedByIPRA: {Value: "Pending"}}
)
);
Set(
varDialogSaveLabel,
false
);
Navigate('Raw material overview')
Thank you
Claudia