cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chucksta
Level: Powered On

Getting a Dropdown field to auto populate text to another field

I am having the issue with the naming of the combobox of a sharepoint list item. 

What I am trying to do is make what ever selection a user selects in the RTO dropdown box, that it will autofill a text field box labeled "Critical".

 

What I am doing is a form that is running from Sharepoint list. 

I select Customize with Powerapps and enter this if statement in the Default field of the Critical text box,

Currently I have a support intake form that I am currently building for my company and we have a Sharepoint list that has a:

rto.jpg

 

 

I also have a "Critical"  field on the form that is currently a text field which I want to make this field autopopulate which ever dropdown item a user chooses from the Recovery Time Object (RTO) field and also color code based off the selection from the RTO field.

 

Screenshot 2

RTO Color Field needed to popluate to Critical field:

rtocolorcode.PNG

 

Example of what I an requesting:  if a user pick option "A" from RTO dropdown in the screenshot 1. above, it then places the selection RTO Rating in the Critical Field in red as High (Critical) as seen screen shot 2 above.

 

I wish it could make the whole field turn the color of the selection,  like highlighting the whole field in the selection in the corresponding collors but not sure if that could be done, so the critical field would look like this:

 

2019-09-11_12-19-07.png

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Edwin-Abdalian
Level 10

Re: Getting a Dropdown field to auto populate text to another field

I created a comboBox called cmbRTO with Values of A,B,C,D,E

Table({RTO: "A"}, {RTO: "B"}, {RTO: "C"}, {RTO: "D"}, {RTO: "E"})

1- Make sure to set the SelectMultiple property to false

2- Set the Text property of your label to cmbRTO.Selected.RTO (replace cmbRTO with your control, and RTO with your column's name)

3- Set the Fill property of your label to: 

Switch(cmbRTO.Selected.RTO,"A",Red,"B",Yellow,"C",Green,"D",GreenYellow,"E",LightBlue)combo1.PNG------------------------------

Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

 

View solution in original post

Edwin-Abdalian
Level 10

Re: Getting a Dropdown field to auto populate text to another field

use DataCardValue35.Selected.Value(or the column name, it will suggest you when you start typing in)

View solution in original post

10 REPLIES 10
Edwin-Abdalian
Level 10

Re: Getting a Dropdown field to auto populate text to another field

I created a comboBox called cmbRTO with Values of A,B,C,D,E

Table({RTO: "A"}, {RTO: "B"}, {RTO: "C"}, {RTO: "D"}, {RTO: "E"})

1- Make sure to set the SelectMultiple property to false

2- Set the Text property of your label to cmbRTO.Selected.RTO (replace cmbRTO with your control, and RTO with your column's name)

3- Set the Fill property of your label to: 

Switch(cmbRTO.Selected.RTO,"A",Red,"B",Yellow,"C",Green,"D",GreenYellow,"E",LightBlue)combo1.PNG------------------------------

Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

 

View solution in original post

chucksta
Level: Powered On

Re: Getting a Dropdown field to auto populate text to another field

@Edwin-Abdalian  Thanks for replying sir.

 

So this is the part that is currently hard to change as I am not sure what the combo cards name would be to change it. The value shows datacardvalue35 for the field, now would I need to change the whole RTO card or the RTO card field?

 

Whole RTO Card:

1.png

 

 

OR the Field value: DataCardValue35

 

2.png

 

 

 

 

Edwin-Abdalian
Level 10

Re: Getting a Dropdown field to auto populate text to another field

use DataCardValue35.Selected.Value(or the column name, it will suggest you when you start typing in)

View solution in original post

chucksta
Level: Powered On

Re: Getting a Dropdown field to auto populate text to another field

@Edwin-Abdalian   You are a GOD send sir!! Thats works as it should per your instruction. 

One more thing is there a way that instead of getting the RTO text to populate to the text field, i could instead get it to populate to the text below: if a selection was made something tlike this below:

 

 

SO basically instead of "A. 0-8 Hours" showing in my text field, it would show 3.png ?

Edwin-Abdalian
Level 10

Re: Getting a Dropdown field to auto populate text to another field

Yes you can, use the switch function again on the Text property of your textbox

Switch(DataCardValue35.Selected.Value,"A. 0-8 Hours","High(Critical)","B. 8-24 Hours","Elevated", ...so on)

 

--------------------------------------------------------------------

Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

chucksta
Level: Powered On

Re: Getting a Dropdown field to auto populate text to another field

@Edwin-Abdalian  it seems when i changed it it didnt make the change.

I just added one line to check but it stayed the same am I supposed to be editing it at the Text mode or format. text field in the shot:

 

I also used this to test first, before completing the whole statement:

 

Switch(RTO.Selected.Value,"A. 0-8 Hours","High(Critical)")

 

4.png

Edwin-Abdalian
Level 10

Re: Getting a Dropdown field to auto populate text to another field

I thought that red box is a label. but it's a text input. you need to add the switch function to the Default property of it

Highlighted
chucksta
Level: Powered On

Re: Getting a Dropdown field to auto populate text to another field

@Edwin-Abdalian  so I can have two switch functions in the default field for the datacard29(Critical) text box?

The Default property for the critical text box is where I added the first switch you gave me for the RTO to show up, is that where i need to add the switch also for the text to show up instead of the drop down entries as well?

 

5.png

Edwin-Abdalian
Level 10

Re: Getting a Dropdown field to auto populate text to another field

No, the first Switch was onthe Fill property to change the color, the second swaitch is on the Default property to set the value

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,491)