cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ruwna
Frequent Visitor

change the value of text lable based on the selected value of the combo box

Hi All,

I have set Combo box valued with ["Monthly", "Weekly","Daily"]

 

And I wanted to get the combo box selected value to a lable based on following senario

 

if (cmb.selected.value = "Monthly")

{

change lable text value = 30

}

else if (cmb.selected.value = "Weekly")

{

change lable text value = 7

}

else

{

change lable text value = 1

}

 

Hope my question clear to you all . Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
SebS
Memorable Member
Memorable Member

Hello,

 

 

If(Cmb.Selected.Value = "Monthly","30",Cmb.Selected.Value = "Weekly","7","1")

 

 

You could also use Switch()

 

 

Regards


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

View solution in original post

2 REPLIES 2
SebS
Memorable Member
Memorable Member

Hello,

 

 

If(Cmb.Selected.Value = "Monthly","30",Cmb.Selected.Value = "Weekly","7","1")

 

 

You could also use Switch()

 

 

Regards


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
AaronKnox
Resolver IV
Resolver IV

Hi @ruwna,

In the Text property of the label, consider this formula:

If(cmb.selected.value = "Monthly", "30", cmb.selected.value = "Weekly", "7", "1")

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,122)