Power Apps: Set a Field Value

This is one of those topics that I get asked about all the time, but is a little interesting to explain, because it works totally differently than what you may be used to in InfoPath or SharePoint Designer.  How do you automatically set a field’s value in PowerApps?  An example of a common scenario is when saving/submitting a form, is to set a status field to some certain value, maybe based on a condition in the form.  In this first, simple example, I’ll set a field called “Status” to say “Submitted” when I fill out a new form.

Here are the steps, at least one way to go about it:

For a customized SharePoint list form:

  1. Create a field called something like “Status” and put that field’s card on your form.
  2. Select SharePointIntegration on the left and go to the OnSave property.  Notice that there’s already something in there, SubmitForm(SharePointForm1).  You’ll be adding a new function in front of this one, with your logic.  In this example, only if it’s a new form, I want to set the status to Submitted when I first save it.  So, here’s my logic:
    If the mode of the form is New, then set a variable called varStatus to the value of “Submitted”.  Then submit the form to SharePoint. This syntax is assuming that your status field is a text field.  If it were a choice or lookup or anything else, the syntax would be different for different types of fields.
  3. Next step is to put the value of that variable in the status field.  Select the Status card, unlock it, and go to the Default property of it.  If the variable varStatus is blank, then just show the value that’s already in that field.  Otherwise, if the variable is not blank then put the value of the variable in there instead.
  4. For a bonus, if you’d like to set the status so that no one can edit it in the form, select the Status card, and go to the DisplayMode property of it.  Set it to DisplayMode.View

For a PowerApps App (not a customized list form):

Step 2 is the only different step.  Select your Submit button if you already have it on your form (insert one if you don’t have one yet).  Go to the OnSelect property of this button.  Use the same formula shown in step 2 above.  Then proceed to step 3.

To set a field value based on another field’s value

If you’d like to have the status of your form, based on a certain condition, the example above just looks at whether the form is new or not, but if you want it to be based on the value of another field, your step 2 would be different.  In this example, if someone selects the word “Approved” in a choice field called “Manager Approval”, then you want to make the form’s status automatically say “Approved”.

  1. In the form, select the drop-down box inside the card for manager approval.  In this example, you can see that I went ahead and renamed mine and called it drpManagerApproval.  Rename yours to something useful here.
  2. Then, go to the OnSave property of the form like you did in step 2 for a customized SharePoint list form, or if it’s not a customized list form, just go to your submit button. Basically, using that same logic, with having the varStatus, you need to know the name of the control that the value is in, then set the variable.  You also need to make sure to do step 3 above, exactly the same.

There, as long as you understand the concepts of variables, controls and submitting, that’s all there is to it.

Looking for a more in-depth knowledge of PowerApps?  Check out my PowerApps Training classes!


  • The approach you described does not always work. The PowerApps documentation states that formulas are not always guaranteed to execute in the order they are placed in the formula box. Also I have tried your approach with mixed results. Sometimes the Default property does not evaluate the variable you set before the SubmitForm formula runs and the new Status is not committed to the data source.
    I have had to make the updating of the Status and the submission of the form two discreet actions. First a checkbox or something similar is used to set the variable which in turn updates the value of the Status field then a button is used to submit the form. This guarantees the Status Default property has time to evaluate the variable before the form is submitted.


  • Hi Laura,

    I am watching your lot’s of video in PowerApps. It’s really help me a lot to learn and developing any application in PowerApps.

    Currently, i have a requirement where i get your advice.

    I have a Choice field in List and that is a Status field. I would like to Change the DisplayMode when the Status is “End” while Editing the item from List.

    That’s means in any Item of the List, if the Item Status is “End”, then any user not able to Edit the Item.
    Means, The SharePoint Form is in View mode (i.e. SharePointForm1. DisplayMode = DisplayMode.View). I am using PowerApps customize form.

    Below are the Steps to follow to create the scenario :

    Step 1 : Create a List (Name Tasks).
    Step 2 : Create a Status Field (Conatin values : “New” , “Inprogress”, “Failed”, “End”)
    Step 3 : Now Open the Tasks List. and Click PowerApps -> Customize forms.
    Step 4 : Add a Button. Button1.OnSelect = SubmitForm(SharePointForm1). Button1.Title : Submit
    Step 5 : Publish To SharePoint
    Step 6 : Create New Item with a Status “End”
    Step 7 : Save the Item using the Button ( Submit) and Close the apps.
    Step 8 : Now select the Item from the List and Click Edit
    Step 9 : The form opening with Edit Mode. But I need the Form will open in View mode. Because, the Item Status is “End”. User not able to Update any Field of the Item.

    I am looking for your advice.

    Thank you & Regards,


  • Hi Laura,

    I was wondering how I would set a metadata field in an item in one list based on the value of the same metadata field in a related item in another list. The two lists are related through a lookup column (not the metadata one) and I don’t want to force users to pick the same metadata value manually, but it should be the same for both.



  • Actually, I think I just figured it out. It would have been difficult at best if I had to know the value of each, but since I already had the column set (manually) in one item, I was just able to use the references to the Path, WssId, TermGuid, Value and Label. Worked like a charm!


  • I am using powerapps to customize list forms. How can I move these to prod. Tenent.

    MS says we cannot… it’s not available feature now.

    So, what should be idle way of development if we can’t move these customised powerapps list form.


  • We have a PowerApps form with several fields that must be completed before the form can be submitted to the Sharepoint List.

    We can’t make them required or mandatory on the Content-Type and List because we want the users to be able tosave their data, and come back to it to edit it before Submitting…

    So we need to disable/hide the Submit button until these fields are completed by the user.

    In our Submit Button control we are using a formula to control the Visibility property of the button, or it’s container which is the footer.

    So we have tried this kind of thing:

    TitleField.Text “”,DescOfInitiativeField.Text “”, DateRaisedField.SelectedDate Date(
    Not IsEmpty(PersonalDataChoiceField.SelectedItems.Value),
    Not IsEmpty(SpecialCatChoiceField.SelectedItems.Value),
    Not IsEmpty(ChildrensDataChoiceField.SelectedItems.Value),
    Not IsEmpty(CriminalChoiceDataField),
    Not IsEmpty(SourcesOfDataChoiceField.SelectedItems.Value),

    but we are not having any luck…

    So what’s the correct way to go about this? How can we test that at least one of the options in each of our combo-box fields is selected?


    • I recommend selecting each card, and put logic in the “required” property for each card. That way, you don’t have to make them required in SharePoint, but they are required just in PowerApps. So something like if status equals draft, then required is false, otherwise true.


  • Hi Laura, how would I go about using this logic to change the value of one drop down menu (DD1), based on the selection of a second drop down menu (DD2)? When I try to do this, I get an error message: “The property expects Record Values, but this rule produces incompatible text values”


  • Hi Laura,

    I am playing around with the PowerApps Leave Request template.

    On that template has the submit to for approval users. Is it possible to used this using static value from a button instead of using change popup?


  • Deviprasad Shetty

    Hi Laura

    I have customized form in power apps and I have custom List Field Request status. How can update this field to submitted while submitting new form and update this field to Approved when approver edit it edit form. This field while not be available in form view it will be hidden in new and edit form but only available in close form.

    Thanks, and Regards,
    Deviprasad Shetty


    • Deviprasad shetty

      Hi Laura,

      We have tried this approach it works great for Form in New Mode. but then once request is submitted Manger open form in edit mode Then should we use SubmitForm or EditForm menthod . On form load global variable should fetch current status and then it should clear global variable else it shows up last status of last entry on load.

      Thanks and Regards,
      Deviprasad Shetty


  • Deviprasad Shetty

    Hi Laura,

    Can we assign SharePoint List field value of particular item to global variable on load of PowerApps.
    This check Request status and navigate screen of PowerApps

    Deviprasad Shetty


    • I’m also trying to do this, and would love to hear the answer. I’ve seen a couple pages with suggestions, but results seem to be unpredictable… sometimes the field pointing to the variable gets set correctly, and sometimes not, with no pattern that I can discern.


  • Is there any way to set the default value of a people picker to a specific user? I’ve found references for defaulting a people picker control to the current logged in user but that’s not what I’m after.


  • Hi, I’m trying to extract emails out of a repeating table in an InfoPath form so that I can send an email response form to each person identified. I’m new to Flow and having some trouble figuring out how to extract that data.


  • Hi Laura, I am curious to know if you have ever had a delegation error on the form in PowerApps – showing up against the default formula for Item (SharePoint form)? It is objecting to First. I have read First is non-delegable but it seems odd that the error is for a default formula…thanks


  • Thanks for this article Laura! I had been setting Default of the control (text field) to a variable instead of setting Default for the card itself and wasn’t behaving as I expected. Followed your guidance and got it working. Thank you!


  • so what if I have a var set called newstatus. And I want the value of that to go into a field on my form. What I thought would work is in the default of the field on form I say If(not(isblank(newstatus)),newstatus, thisitem.status). So that if newstatus variable wasn’t set in the logic then the status field stays left alone but if something is in newtatus variable then the status gets changed. It looks to work, I can see it on form. Then I click save and it goes away and leaves the status unchanged. Ideas?


    • Not sure where exactly you’re putting that formula you mentioned, but you should put it in the “Update” property of the card for the status field.


  • When I try to use your conditional formula for the default value of my Status field, I keep getting the error message that it is expecting a Record value in place of my variable. I have declared my variable and populated it in the OnVisible of my form. What am I doing wrong?


  • Hi Laura,
    How to clear a field’s value based on condition? I write the following formula to the “Reset” property of that “DataCardValue” but it works only on a new form. It does not work on an edit form. Can you please help?
    If(DataCardValue11.Selected.Value=”RED”,true, false)


Leave a Reply to David Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.