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

Text change based on Radio Button Selected

EDIT: 

Morning, 

Sorry I really struggled to get this into words. 

 

This is what I'm trying to do:

 

If the answer to "this question" on Screen1 is a "Risk" then display "this question" at the top of the Screen2 (Comment Page) as a title.

Then collect all info and return to Screen1 then do it all over again next time "Risk" is selected.

 

I have 57 questions to goth though and only other way I can think of is having a comment page per question and navigate it to the specific page but I hoped that there would be a formula I could use to avoid having 57 of the same page. 

 

I hope this makes a bit more sense? I can provide screenshots if needed.

 

 

 

 

 

Original Post:

Hi All, 

 

I'm fairly new to PowerApps and I've hit somewhat of a stumbling block with my app. 

 

I have created a mobile "H&S Survey" app which uses radio buttons with the options "Safe" or "At Risk" and a Label withthe name of the Activity. When the user selects the "At Risk" option they will be navigated to a "Comments" page to explain why the activity is "At Risk". 

 

This is where I'm stuck... I would like the Activity Name to appear at the top of the Comments page so that people can see which activity they are commenting on. The Activity Name is currently saved in a label next to the Radio Butto. Then I would like them to then submit their comments which will then be saved with the Activity Name in a Collection.

 

I have managed to do this for a single activity using the IF fuction but we have 57 activities to chose from. 

 

Is there a way for this to loop around and collect the information and move on to the next Activity? Note that due to the nature of the survey it won't always be answered in chronological order. 

 

If you need any more information please let me know, Thank You! 

Charlotte  

4 REPLIES 4
Highlighted
Resident Rockstar
Resident Rockstar

Re: Text change based on Radio Button Selected

If the name is already in a label, you can reference that label text directly using this:

 

Label1.Text

 

I think I read that correctly, is that where you were stuck?

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

Highlighted
Community Support
Community Support

Re: Text change based on Radio Button Selected

Hi @Chazp99 ,

Could you please share a bit more about your scenario?

Do you want to display the Activity Name at the top of the Comments page?

 

Based on the needs that you mentioned, I think you could reference the selected Radio button value within your Comments page directly through the following formula:

Radio1.Selected.Value

 

Within your Comments page, please reference the selected Radio button value directly using above formula.

 

Best regards, 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Text change based on Radio Button Selected

Morning, 

Sorry I really struggled to get this into words. 

 

This is what I'm trying to do:

 

If the answer to "this question" on Screen1 is a "Risk" then display "this question" at the top of the Screen2 (Comment Page) as a title.

Then collect all info and return to Screen1 then do it all over again next time "Risk" is selected.

 

I have 57 questions to goth though and only other way I can think of is having a comment page per question and navigate it to the specific page but I hoped that there would be a formula I could use to avoid having 57 of the same page. 

 

I hope this makes a bit more sense? I can provide screenshots if needed.

 

Thank you

Charlotte

 

 

Highlighted
Community Support
Community Support

Re: Text change based on Radio Button Selected

Hi @Chazp99 ,

How do you list all your 57 questions in your app? Using Gallery or separated Labels?

 

Based on the needs that you mentioned, I think the Gallery control could achieve your needs. On your side, you could consider store all your 57 questions into a data source (e.g. a Excel table), then add this data source in your app, connect the Gallery to your data source. 

Within the Gallery, you could add a Label control to display the question info from your data source using the following formula:

ThisItem.QuestionColumn

then add a Radio control within this Gallery to provide choices for end user for each question in your Gallery.

 

Within your Comments Page, add a Label in the Top, set the Text property of the Label to following:

If(
   Gallery1.Selected.Radio1.Selected.Value = "Risk",
   Gallery1.Selected.QuestionColumn    // QuestionColumn represents the column in your data source, which used to store the question name
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,919)