1

I have a SharePoint list with a choice field. I'm customizing the list form with PowerApps, and I want to have the value of the choice field set via buttons on the form (ie clicking "Submit" will set the choice field to "Submitted", clicking the "Reject" button will set the choice field to "Rejected", etc). I want to use a choice field so that if someone gets to the back-end of the list, they don't change the field value to something like "Bob" or whatever they accidentally type in to a text field.

When I try to put a formula into the Default on the PowerApps form, it keeps throwing errors:

Formula-If(IsBlank(CurrStatus),ThisItem.Request_Status,CurrStatus)

Issue: Invalid argument type (Text). Expecting a Record value instead

CurrStatus is defined in the OnVisible of my FormScreen1.

What am I doing wrong/missing here?

0

When you set CurrStatus you need to set it as a record type. So, something like this:

UpdateContext({CurrStatus:{Value:"Your Choice Here"})

Alternatively, you could update the above formula like this:

If(IsBlank(CurrStatus),ThisItem.Request_Status,{Value:CurrStatus})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.