cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chazp99
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
EricLott
Resident Rockstar
Resident Rockstar

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.

v-xida-msft
Community Support
Community Support

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.
Chazp99
Frequent Visitor

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

 

 

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,550)