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

Auto Popluate a dropdown field in my form to paste custom entry to a field and color match the field

Howdy All,

 

 

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

 

Screenshot 1

Recovery Time(RTO) dropdown field as seen below:

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:

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.

 

 

Can anyone help point me in the right direction to get this done.

Your help is surely appreciated and thanks in advance.

7 REPLIES 7
Community Support Team
Community Support Team

Re: Auto Popluate a dropdown field in my form to paste custom entry to a field and color match the field

Hi @chucksta ,

Do you want to auto-populate the "Critical"  field in your Edit form based on the selected item in your Recovery Time(RTO) dropdown box, and color the text in corresponding color?

 

I have made a test on my side, please take a try with the following workaround:5.JPG

 

4.JPG

Set the Default property of the Critical Text Input box to following:

ComboBox1.Selected.Value

On your side, you may type:

RTOComboBox.Selected.Value

Set the Color property of the Critical Text Input box to following:

If(
    "0-8 Hours" in ComboBox1.Selected.Value,
    RGBA( 255, 0, 0, 1 ),
    "8-24 Hours" in ComboBox1.Selected.Value,
    RGBA( 255, 255, 0, 1 ),
    "1-3 Days" in ComboBox1.Selected.Value,
    RGBA( 50, 205, 50, 1 ),
    "3-10 Days" in ComboBox1.Selected.Value,
    RGBA( 0, 255, 127, 1 ),
    "10+ Days" in ComboBox1.Selected.Value,
    RGBA( 100, 149, 237, 1 )
)

Please check the following GIF screenshot for more details:Test.gif

 

In addition, if you want to fill color within the Critical Text Input box, please consider set the Fill proeprty of the Critical Text Input box to following formula:

If(
    "0-8 Hours" in ComboBox1.Selected.Value,
    RGBA( 255, 0, 0, 1 ),
    "8-24 Hours" in ComboBox1.Selected.Value,
    RGBA( 255, 255, 0, 1 ),
    "1-3 Days" in ComboBox1.Selected.Value,
    RGBA( 50, 205, 50, 1 ),
    "3-10 Days" in ComboBox1.Selected.Value,
    RGBA( 0, 255, 127, 1 ),
    "10+ Days" in ComboBox1.Selected.Value,
    RGBA( 100, 149, 237, 1 )
)

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.
chucksta
Level: Powered On

Re: Auto Popluate a dropdown field in my form to paste custom entry to a field and color match the field

Kris,

 

You have the right Idea in regards to the plan but just a bit off.

I want the Critical field to populate like below:

 

So for instance, if I select 0-8 Hours, the critical field will auto populate tthe text below for that corresponding RTO selection, so it will autopopulate "High Critical" and would color code it in Red. And if I select 8-24 Hours, it will autopopulate the text "Elevated".

rtocolorcode.PNG

 

And so on and soforth for the other selections.

 

 

I wish it could make the whole field turn the color of the selection king of like high light thewhole field in the sleection 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(This is just a paint image to show what I want but if it cant be done, I am fine with that.) 

 

 

Community Support Team
Community Support Team

Re: Auto Popluate a dropdown field in my form to paste custom entry to a field and color match the field

Hi @chucksta ,

Do you want to auto-populate the Rating RTO text value ("High Critical", "Elevated", ...) into the Critical field Text Input box?

 

I have made a test on my side, please take a try with the following workaround:

Set the Default property of the Critical Text Input box to following:

If(
    "0-8 Hours" in ComboBox1.Selected.Value,
    "High (Critical)",
    "8-24 Hours" in ComboBox1.Selected.Value,
    "Elevated",
    "1-3 Days" in ComboBox1.Selected.Value,
    "Moderate",
    "3-10 Days" in ComboBox1.Selected.Value,
    "Low-Moderate",
    "10+ Days" in ComboBox1.Selected.Value,
    "Low"
)

Set the Fill proeprty of the Critical Text Input box to following formula:

If(
    "0-8 Hours" in ComboBox1.Selected.Value,
    RGBA( 255, 0, 0, 1 ),
    "8-24 Hours" in ComboBox1.Selected.Value,
    RGBA( 255, 255, 0, 1 ),
    "1-3 Days" in ComboBox1.Selected.Value,
    RGBA( 50, 205, 50, 1 ),
    "3-10 Days" in ComboBox1.Selected.Value,
    RGBA( 0, 255, 127, 1 ),
    "10+ Days" in ComboBox1.Selected.Value,
    RGBA( 100, 149, 237, 1 )
)

 

Please consider take a try with above solution, then 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.
chucksta
Level: Powered On

Re: Auto Popluate a dropdown field in my form to paste custom entry to a field and color match the field

I did what you suggested but nothing happens when I test it it has errors.

 

I had to remove and cards and re-add them after reloading them from Sharepoint list again:

 

So apparently the default is listed as "Parent.Default" for the Critical Card:

trash.png

 

When I add the :

 

If(
    "0-8 Hours" in ComboBox1.Selected.Value,
    "High (Critical)",
    "8-24 Hours" in ComboBox1.Selected.Value,
    "Elevated",
    "1-3 Days" in ComboBox1.Selected.Value,
    "Moderate",
    "3-10 Days" in ComboBox1.Selected.Value,
    "Low-Moderate",
    "10+ Days" in ComboBox1.Selected.Value,
    "Low"
)

It just adds a red "X" to the text line. and does not populate any of the settings.

 

it also does the same thing when i add the below info to the Fill Line.?

Any Suggestions?

 

 

If(
    "0-8 Hours" in ComboBox1.Selected.Value,
    RGBA( 255, 0, 0, 1 ),
    "8-24 Hours" in ComboBox1.Selected.Value,
    RGBA( 255, 255, 0, 1 ),
    "1-3 Days" in ComboBox1.Selected.Value,
    RGBA( 50, 205, 50, 1 ),
    "3-10 Days" in ComboBox1.Selected.Value,
    RGBA( 0, 255, 127, 1 ),
    "10+ Days" in ComboBox1.Selected.Value,
    RGBA( 100, 149, 237, 1 )
)

 

 

 

 

Highlighted
Community Support Team
Community Support Team

Re: Auto Popluate a dropdown field in my form to paste custom entry to a field and color match the field

Hi @chucksta ,

Could you please share a bit more about the error message within your app?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please make sure the "Critical" field is a Text type field in your SP List.

 

Please also check if the comma (,) is used as List separator within your app. If you use (;) operator as List separator within your app, please modify your formula as below:

If(
    "0-8 Hours" in ComboBox1.Selected.Value;
    "High (Critical)";
    "8-24 Hours" in ComboBox1.Selected.Value;
    "Elevated";
    "1-3 Days" in ComboBox1.Selected.Value;
    "Moderate";
    "3-10 Days" in ComboBox1.Selected.Value;
    "Low-Moderate";
    "10+ Days" in ComboBox1.Selected.Value;
    "Low"
) 

 

Also please make sure you could get the Value property under the ComboBox1.Selected. formula. If you typed Distinct(...) formula within the Items property of the ComboBox1 (Recovery Time(RTO) dropdown box), please modify above formula as below:

If(
    "0-8 Hours" in ComboBox1.Selected.Result;
    "High (Critical)";
    "8-24 Hours" in ComboBox1.Selected.Result;
    "Elevated";
    "1-3 Days" in ComboBox1.Selected.Result;
    "Moderate";
    "3-10 Days" in ComboBox1.Selected.Result;
    "Low-Moderate";
    "10+ Days" in ComboBox1.Selected.Result;
    "Low"
) 

 

If the issue still exists, please consider re-generate a new app based on your SP list, then try above formula again, 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.
chucksta
Level: Powered On

Re: Auto Popluate a dropdown field in my form to paste custom entry to a field and color match the field

Thanks for your help on this and it is surely appreciated. First, I have added the commas as requested via the lost post you sent us:

 

See shots below of the error I am getting. Also the Critical field is a text only field.

Also below, are the results from pasting the IF statement into the critical field.

1.png2.png

 

 

 

One thing Im confused about is the Recovery TIme RTO combobox , is the location and naming to change the formula too for the dropdown. Im sorry, I am not that good with powerapps but I am glad you are helping me with this.

 

Below is the RTO datacardValue for the combo RTO box:

 

3.png

chucksta
Level: Powered On

Re: Auto Popluate a dropdown field in my form to paste custom entry to a field and color match the field

OK. I am having the issue with the naming of the combobox. 

What I am trying to do is make what ever selection a user selects in the TRO 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,

 

 

 

If( "A. 0-8 Hours" in Choices('Production Support Intake Form'.Recovery_x0020_Time_x0020_Object).Value, RGBA ( 255, 0, 0, 1 ),

but nothing is working when I test it.

 

The naming is conflicting when trying to see what the dropdown box name is to set it in the other text field. Can someone pelase help me with this?

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.

Users Online
Currently online: 395 members 5,187 guests
Please welcome our newest community members: