web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Updating Label based o...
Power Apps
Answered

Updating Label based on Radio Button

(0) ShareShare
ReportReport
Posted on by 39

Hello

 

As a newbie trying to learn PowerApps I am at a crossroads.

 

I have a form/screen that has 3 questions that you select yes or no using radio buttons.

As well on this form I have a label that displays your progress as "Question 1/40". 

 

Question 1 is visible on start and as you answer or select the next question appears on the form. 

 

My goal is to make the label show "Question 2/40" when Question1 is completed and 2 appears. I have no issues doing this until I get to Question3. I can't figure out how to compound a formula to use the two selected.value if statement. Every time I try I get a blank.

 

I had the following TEXT = IF(Question1.Selected.Value=True,"Question 2/40","Question 1/40")||IF(Question2.Selected.Value=True,"Question 2/40","Question 3/40")

 

Help!!!

Categories:
I have the same question (0)
  • OdinDelToro Profile Picture
    407 on at

    Hello @Mike5025,

     

    Try to include all possible combinations within the IF statements. You can try the following approach:

    TEXT =
    IF (
        Question1.Selected.Value = FALSE,
        "Question 1/40",
        IF (
            Question1.Selected.Value = TRUE,
            "Question 2/40",
            IF (
                Question1.Selected.Value = TRUE & Question2.Selected.Value = TRUE,
                "Question 3/40"
            )
        )
    ) 

     

    Hope this helps clarify the doubt, let me know in case you're still facing an issue within it.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Mike5025 Profile Picture
    39 on at

    Giving me error in formula

    Mike5025_0-1702400216583.png

     

     

  • OdinDelToro Profile Picture
    407 on at

    Hello @Mike5025,

     

    Power Fx is case-sensitive. Please try the following:  

     

    TEXT =
    If(
        Question1.Selected.Value = false,
        "Question 1/40",
        If(
            Question1.Selected.Value = true,
            "Question 2/40",
            If(
                Question1.Selected.Value = true & Question2.Selected.Value = true,
                "Question 3/40"
            )
        )
    ) 

     

    Hope this helps clarify the doubt, let me know in case you're still facing an issue within it.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Mike5025 Profile Picture
    39 on at

    Oops!!!!! This solved the error problem but nothing shows as it should - the label is always blank

  • Mike5025 Profile Picture
    39 on at

    Sorry here is the screen shot

     

    Mike5025_0-1702401386806.png

     

  • OdinDelToro Profile Picture
    407 on at

    Hello @Mike5025,

     

    Not sure how your form is built. Nonetheless, you can follow an approach to make it visible depending on previous answers.

    You have a form with 3 questions, on each label of the data card include in the text "Question 1/40" "Question 2/40" and "Question 3/40" respectively.

    OdinDelToro_0-1702454220302.png

    After that you'll be able to visualize the title of each card with the name that you're expecting to display.

    OdinDelToro_1-1702454315257.png

    Now, depending on the answers that you included on the choice column for each question or if you're including text, you'll need to use that on the visible property. In this example, I included as possible answers for each questions the following:

    OdinDelToro_2-1702454593389.png

    OdinDelToro_3-1702454617945.png

    OdinDelToro_4-1702454648128.png

    Now, what you want to achieve is to display the questions sequentially after there is an answer from previous question. To achieve that, you need to select the next question data card and in the Visible property you need to include a formula that makes visible (true) in case it's selected any of the possible answers from previous question. If you have 3 answers, include the three answers pointing to the selected.value of the datacardvalue as follows:

    OdinDelToro_5-1702454894044.png

    After that, if you don't have anything selected it will just display first question

    OdinDelToro_6-1702455060207.png

    Once you select any answer from Q1, you'll be able to visualize second question

    OdinDelToro_7-1702455106442.png

    Now, apply same logic to question 3.

    OdinDelToro_8-1702455270456.png

    After that, if you don't have any answer selected in question 2, next question won't be displayed until you select an answer from Q2.

    OdinDelToro_9-1702455324192.png

     

    Once you select answer on Q2, Q3 will be displayed.

    OdinDelToro_10-1702455359652.png

     

    Hope this helps clarify the doubt, let me know in case you're still facing an issue within it.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • Verified answer
    Mike5025 Profile Picture
    39 on at

    Hello OdinDelToro

     

    I thank You very much for your assistance - I found the solution based of your code late yesterday. 

    I needed to use the Blank() instead of true and just needed to remove the & parameter. 

    Works perfect!!!!

    Mike5025_0-1702478764443.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 474

#1
Valantis Profile Picture

Valantis 474

#3
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

Last 30 days Overall leaderboard