cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mike2020
Regular Visitor

Image Selection based on 2x Drop Downs

Hi There,

I've made some progress dynamically changing my displayed image based on the value of a drop down;

 

 

If(
DataCardValue52.Selected.Value= "NS", mk_fs_00_0_08_top_01,
DataCardValue52.Selected.Value= "SS", mk_fs_00_0_08_top_02,
DataCardValue52.Selected.Value= "FS", mk_fs_00_0_08_top_03)

 

 

 

 

This works as expected.

HOWEVER.

I need to change the image based on the value of two different drop downs, not just one !

My combinations are as follows:

Drop Down 1 - NS,SS,FS

Drop Down 2 - 7,8,9,10

 

Unique combinations as below.

NS7,NS8,NS9,NS10,SS7,SS8,SS9,SS10,FS7,FS8,FS9,FS10

 

Can I create a formula to take both drop downs into account when selecting the correct image to display OR

should I create an intermediate text box to merge the two drop down values then check that for the image selection?

 

Thanks in advance for any help,

Mike.

1 ACCEPTED SOLUTION

Accepted Solutions

I managed to get this working with the following;

This is the code to be put into the image source field.

 

Switch((DataCardValue52.Selected.Value & DataCardValue57.Value), 
"NS7", mk_ns_00_3_07_top_04, 
"NS8", mk_ns_00_4_08_top_04, 
"NS9", mk_ns_00_5_09_top_04, 
"NS10", mk_ns_00_6_10_top_04, 
"SS7", mk_ss_00_1_07_top_04, 
"SS8", mk_ss_00_2_08_top_04, 
"SS9", mk_ss_00_3_09_top_04, 
"SS10", mk_ss_00_2_10_top_04, 
"FS8", mk_fs_00_0_08_top_04, 
"FS10", mk_fs_00_0_10_top_04)

 

 

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Mike2020 ,

I will give you some syntax - I know the combinations will be wrong

With(
   {
      vChoice:                                                //call it whatever you want
      DropDown1.Selected.Value & Dropdown2.Selected.Value     //I assume Choice fields
   },
   Switch(
      vChoice,
      "NS7" || "NS8" || "NS9" || "NS10",
      mk_fs_00_0_08_top_01,
      "SS7" || "SS8" || "SS9" || "SS10",
      mk_fs_00_0_08_top_02,
      "FS7" || "FS8" || "FS9" || "FS10",
       mk_fs_00_0_08_top_03
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

I managed to get this working with the following;

This is the code to be put into the image source field.

 

Switch((DataCardValue52.Selected.Value & DataCardValue57.Value), 
"NS7", mk_ns_00_3_07_top_04, 
"NS8", mk_ns_00_4_08_top_04, 
"NS9", mk_ns_00_5_09_top_04, 
"NS10", mk_ns_00_6_10_top_04, 
"SS7", mk_ss_00_1_07_top_04, 
"SS8", mk_ss_00_2_08_top_04, 
"SS9", mk_ss_00_3_09_top_04, 
"SS10", mk_ss_00_2_10_top_04, 
"FS8", mk_fs_00_0_08_top_04, 
"FS10", mk_fs_00_0_10_top_04)

 

 

View solution in original post

@Mike2020 ,

You have marked your own post as the solution?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

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.

Users online (1,374)