cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sifu
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
RandyHayes
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!
yashag2255
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!

Sifu
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!
Sifu
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (59,163)