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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / If someone answers a c...
Power Apps
Answered

If someone answers a certain question with a specific answer it automatically fills in another answer

(0) ShareShare
ReportReport
Posted on by 341

I have list that I would like to have an answer automatically filled in when another question gets answered with a particular response. 

 

For example I have a list column named "issues" selected by drop down with choices Quality, Part Missing, and Vendor Issues. Also, I have list column named "Responsible" that has choices ORE, Quality, Purchasing as the choices. If someone selects Quality I want it to fill in the list column named "Responsible" with Quality automatically, if someone selects Vendor Issue I want it to fill in the list coulumn named "Responsible" with Purchasing. How do I add this to my power app?

 

 

 

Categories:
I have the same question (0)
  • Ygor Profile Picture
    44 on at

    Hi @Evan_S1,

    Maybe you can use switch function to resolve this. In "Text" property of your list column named "Responsible", use a code like this:
    Switch(
        Dropdown1.SelectedText.Value,
        "Quality", "Quality",
        "Part Missing", "ORE",
        "Vendor Issues", "Purchasing"
    )

     

    Where the DropsDown1 is the drop down of your list column named "Issues"

    If this solves your question, would you be so kind as to accept it as a solution.

  • Evan_S1 Profile Picture
    341 on at

    @Ygor This isn't working. Also, I forgot to mention in power apps these questions are being answered on a form generated from list.

     

    Code shows: Choices([@'Production Stoppage - DRAFT 1'].Responsible);
    Switch(
    Issue.SelectedText.Value;
    "Quality Issue"; "Quality";
    "Missing Stock Part"; "ORE";
    "Vendor Error"; "Purchasing")

     

    Error Shows:

    Evan_S1_0-1681746025175.png

     

  • Ygor Profile Picture
    44 on at

    Oh sorry, i was thinking you wanted to show it on a label. But you can resolve your problem changing column type from your list. Instead you use choice column, prefer to use single line of text, so you can record in list the option according by issue column drop down, using your code:
    Switch(
    Issue.SelectedText.Value;
    "Quality Issue", "Quality",
    "Missing Stock Part", "ORE",
    "Vendor Error", "Purchasing"

    )

  • Evan_S1 Profile Picture
    341 on at

    Current Form:

    Evan_S1_0-1681754143463.png

     

    Issue function:

    Evan_S1_1-1681754258349.png

     

    Responsible Function:

    Evan_S1_2-1681754316693.png

     

    When I put this function in either function, I get the error below:

     

     Choices([@'Production Stoppage - DRAFT 1'].Responsible); Switch(
    Issue.SelectedText.Value;
    "Quality Issue", "Quality",
    "Missing Stock Part", "ORE",
    "Vendor Error", "Purchasing"
    )

    Evan_S1_3-1681754486013.png

     

     

     

     

  • Ygor Profile Picture
    44 on at

    Yes, this error occurs because the column type is set to "Choice". Your available options are stored in [@'Production Stoppage - DRAFT 1'].Responsible. However, as I proviously mentioned, you don't necessarily need to use this approach. Instead, you can simply set your "Responsible" column to "Single line of text" and record the field based on the issue column.

    I'm not sure if I was clear in my answer, but by using "single line of text" you have the freedom to fill in this field based on the person's choice. Are you using SharePoint list, Dataverse or other database?

  • Evan_S1 Profile Picture
    341 on at

    SharePoint.

     

    I changed the SharePoint List column "Responsible" to single line of text instead of Choice.

    Still seeing the same error.

  • Ygor Profile Picture
    44 on at

    It shouldn't be giving this error still, maybe you're using the old code or you need to update the list in Power Apps. Now you can use this code with the condition:

     

    Switch(
    Issue.SelectedText.Value;
    "Quality Issue", "Quality",
    "Missing Stock Part", "ORE",
    "Vendor Error", "Purchasing"
    )

     

  • Evan_S1 Profile Picture
    341 on at

    I changed it to single line of text but it threw off all the other formulas I had already put within the app. Also, I would prefer to keep it as a drop down in case the "Responsible" choice needs to be changed based on the actions and delegation of the problems the app is capturing. 

     

    Is there a formula by chance that can auto populate it based on both being columns set up as choices?

  • Ygor Profile Picture
    44 on at

    Hi again @Evan_S1,

     

    Unfortunately, I don't have a solution for your problem, perhaps someone knows a way to solve this. Personally, I don't use the form editing component because the fields are fixed and do not allow for much flexibility in terms of customization.

     

    I use simple components like text input and dropdowns to build a form, so that I can manipulate them in the app according to my business rules, and then recording in SharePoint with a button. So, I can automatically populate the dropdown and still leave it open for the user to select another option.

  • Verified answer
    Evan_S1 Profile Picture
    341 on at

    Changed it from a drop down to a text label and had the text label auto fill based on the drop down selection.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard