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 / Question: on a App I h...
Power Apps
Unanswered

Question: on a App I have a Dropdown when someone chooses Problem, need to populate the comment box(Narrative) with questions

(0) ShareShare
ReportReport
Posted on by 516

Not sure if this is a good place for this question

How would I get the Narrative (Comments) box, to have prepopulated questions in it if someone selects #ddProblem.
(JS code).

 

Thanks for any and All help.

 

 

Categories:
  • One Profile Picture
    416 on at

    Hello @SPS-DEV-22,

    I would recommend giving each question it's own label to be populated by the dropdown selection, and each response it's own textbox. below are some screenshots as an example.

    One_2-1652809668685.png

    One_3-1652809686143.png

     

    You will put the problems to be selected in the dropdown, then the labels will be populated with the questions corresponding to the problem selected from the dropdown, with a textbox below it for the user to respond to the question. I used Test for my dropdown values, you will use whatever the 'Problem' is. 

     

    Code for Label1 is as follows:

    If(Dropdown.Selected.Value = "Problem1", "Question 1.1 Goes Here", Dropdown.Selected.Value = "Problem2","Question 1.2 Goes Here")

     

    Code for Label2 is as follows:

    If(Dropdown.Selected.Value = "Problem1", "Question 2.1 Goes Here", Dropdown.Selected.Value = "Problem2","Question 2.2 Goes Here")

     

    ------------------------------------------------------------------------------------------------------------------------------
    Please click "Accept as Solution" if this post answered your question so that it is helpful for people having similar questions. If you found this post helpful smack that Thumbs up button! Thanks!

  • SPS-DEV-22 Profile Picture
    516 on at

    Ok, I got the comment box with text in it.

     

    const str1 = 'Hello';
    const str2 = 'World';
    const str3 = 'test';
    $('#Narrative').val(str1.concat(' ', str2, '', str3));

     

    How would I break up each string as it's own line ?  as the questions are LONG.

    I have 4 paragraphs of text to add so people can answer the specific questions

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard