cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Assign variable value based on DataCardValue

Hello,

 

I am trying to set up a varible value based on datacardvalue selected but it is giving me an error

 

If(DataCardValue23.Selected.Value = "customer value", Set(ScoreNew, ScoreNew+1))

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Assign variable value based on DataCardValue

HI @lmahmuti ,

It would be better if you have a second question to make a new item rather than adding on to one that is already answered.  Other community members will not be able to find the second question easily.  Also, if you have figured out a solution to your question, you should either tell the rest of us how you did it or give credit to someone who has answered it for you. 

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: Assign variable value based on DataCardValue

@Imahmuti

Please supply a screenshot of the error message you received.
Highlighted
Super User
Super User

Re: Assign variable value based on DataCardValue

Hi @lmahmuti 

You will need to place the formula in a control that has the ability to complete an action.  For example in the OnChange property of the Textbox control.  Since your If() statement does not contain DefaultResult. IfConditionThenResultDefaultResult ), your statement will return blank if the condition is not met.

Highlighted
Helper III
Helper III

Re: Assign variable value based on DataCardValue

Hello,

 

I got the DataCardValue resolved now I am struggling to get a patch to sharepoint to work. See code below

 

Patch(Mentors_2,Default(Mentors_2),{ScoreNew:ScoreNew.value,ScoreSpec:ScoreSpec.value,ScoreEx:ScoreEx.value, ScoreT:ScoreT.value, ScoreO:ScoreO.value, ScoreP:ScoreP.value, ScoreS:ScoreS.value});Navigate(Home)

 

Where I have title of the sharepoint matching the name of the variable but it is giving me an error. Can you help with this?

Highlighted
Super User
Super User

Re: Assign variable value based on DataCardValue

HI @lmahmuti ,

It would be better if you have a second question to make a new item rather than adding on to one that is already answered.  Other community members will not be able to find the second question easily.  Also, if you have figured out a solution to your question, you should either tell the rest of us how you did it or give credit to someone who has answered it for you. 

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,744)