cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

Update if of a dropdown

hi all,

have a dropdown with few values, lets say 1, 2 and 3

 

trying to create a button that would set value 3... like: 

UpdateIf(BI, (ID=ThisItem.ID), {Status: '3'})

it tells me:  "expecting a records".... any idea how to format this formula?

1 ACCEPTED SOLUTION

Accepted Solutions

@Sifu 

Sorry, I missed a little detail on that.  Your formula should be this:

 

UpdateIf(BI, ID=ThisItem.ID, 
   {Status:
       {Value: "3",
       '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
       }
   }
)

 

That should work for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

6 REPLIES 6
Super User III
Super User III

@Sifu 

Consider the following change to your formula:

 

UpdateIf(BI, ID=ThisItem.ID, {Status: "3"})

 

This assumes that your Status is a text column.

You can also simplify your formula to use the current dropdown value:

 

UpdateIf(BI, ID=ThisItem.ID, {Status: Self.Value})

 

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Dual Super User II
Dual Super User II

Hi @Sifu 

 

Can you share more details about the property that you are using this expression on? Is the dropdown control under a gallery or form? If you can share more details, we might be able to help you better.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Responsive Resident
Responsive Resident

@RandyHayes unfortunately still not it.... see pic below

Sifu_0-1600107968828.png

 

@yashag2255 i try again... its a sharepoint list that i customized with powerapps... one column is a combobox and i want to use one button to change it to a certain value ... this should save time of the user so he does not have to click the drop down choose right option and maybe even save... simply one click "Done"... (this option is also among the possible options within the combo...)

 

@Sifu 

If your Status column is not text (which I mentioned my assumption was for that formula), then you have other provisions to add.

Your formula should look like this to account for that:

UpdateIf(BI, ID=ThisItem.ID, 
   {Status: "3",
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
   }
)

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Responsive Resident
Responsive Resident

@RandyHayes do i require to adjust something or add some connector,? currently it still doesnt like something... (updateif has invalid arguments....

@Sifu 

Sorry, I missed a little detail on that.  Your formula should be this:

 

UpdateIf(BI, ID=ThisItem.ID, 
   {Status:
       {Value: "3",
       '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
       }
   }
)

 

That should work for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (70,212)