cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xnat
New Member

How to change a text field depending on a toggle

Hi,

I would like to know if it's possible to change a value in a text field depending on a toggle?

Let say I click on the toggle and I want the percentage change from whatever it was, to 100.

Thanks.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @xnat 

 

I saw 25 mentioned in the screenshot that you shared earlier so thought that there is some other value. If this is not the case, then you can update the expression to: If(Toggle1.Value, 100)

 

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!

View solution in original post

6 REPLIES 6

Hi @xnat 

 

Can you add the below expression on the Text property of the text label control:

If(Toggle1.Value, 100, ValueToShowWhenNotChecked)

Here, you need to replace ValueToShowWhenNotChecked with the existing expression in the Text property.

 

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!

 

It's a free text field that I want to change to 100 when toggle is on.

That free text field has no text property.

Hi @xnat 

 

I saw 25 mentioned in the screenshot that you shared earlier so thought that there is some other value. If this is not the case, then you can update the expression to: If(Toggle1.Value, 100)

 

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!

Good, the value is save to 100 but the toggle does not save as "on".

@xnat 

 

How are you saving the details and where? What is the column type where do you want to store the toggle value? 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!

It's my error. The toggle was not associated to a column in my sharepoint list.

Everything works now.

Thank you very much.

I really appreciate your help.

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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,485)