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

List Box code result! Please help

Hi all

please help me as I need this so urgent 

I have created a label called lblResult

 

i set a variable called varToWork

and I have a list box “Yes”, and “No”

 

I want if I choose the yes From the list box a text will appear Ready and the lblResult to be green color

and if I select the No the text to appear Not Ready the lblResult box color to yelloe

 

how do I code that? Please help

 

1 ACCEPTED SOLUTION

Accepted Solutions

I believe that you have to use comma (,) and not semicolon (;). Can you try it, please?
I think that can be for language

 

Rellenar: Si (ListBox1.Selected.Value = "YES", Green, Yellow)

Texto: If (ListBox1.Selected.Value = "YES", "READY", "NOT READY")

View solution in original post

11 REPLIES 11
Helper I
Helper I

I believe this solution can be help you.

 

For txtResult you can use If(Dropdown1.Selected.Value = "YES"; "READY"; "NOT READY") and for fill, If(Dropdown1.Selected.Value = "YES"; Green; Yellow).

 

I hope both sentences help you.

 

 

 

Thank you so much for replying, I am not using a Dropdown I am using a ListBox. I changed the word Dropdown but gave me error.

I believe it will be too similiar, for example, now your sentences will be

Fill: If (ListBox1.Selected.Value = "YES"; Green; Yellow)

Text: If (ListBox1.Selected.Value = "YES"; "READY"; "NOT READY")

 

Finally, for ListBox1 property SelectMultiple you have to select false

I am not sure what I am doing wrong tried it again, didn't work

I believe that you have to use comma (,) and not semicolon (;). Can you try it, please?
I think that can be for language

 

Rellenar: Si (ListBox1.Selected.Value = "YES", Green, Yellow)

Texto: If (ListBox1.Selected.Value = "YES", "READY", "NOT READY")

View solution in original post

Yes, it worked. Thank you so much. I am very new and still in learning process. 

Any question you have, You don't hesitate to communicate it. We all go through the learning curve and we are there to support each other.

 

Good weekend

One more thing please, if I have ListBox1, 2 and 3 and want to put them together like this, do I put at the end ; ???

 

If(ListBox1.Selected.Value = "YES", "NOT READY")

If(ListBox2.Selected.Value = "YES", "NOT READY")

If(ListBox3.Selected.Value = "YES", "READY", "NOT READY")

Sorry, I didn't understand you. Can you explain more, please?

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 (24,928)