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

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
JhonatanOB1993
Helper II
Helper II

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
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.

Top Solution Authors
Top Kudoed Authors
Users online (30,855)