cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wackmack88
Level 8

Use multiple values for choice to textcolumn

Hi there, I have made choice column(Location is the name), with the following value:

 

Amsterdamm

Londen

New York

 

Now i have made a text column and use default function

If(Datacardvalue5.Selected.Value = "Amsterdam", "mailadres", true, false)

This works fine, the text column will update the value with the mailadres. After this i can select the text column in flow but i need two more values. How can i combine this in 1 formula? 


It should be like:
IfCondition1ThenResult1 [, Condition2ThenResult2, ... [ , DefaultResult ] ] )

But i dont get it right with the ,,[][))

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Use multiple values for choice to textcolumn

Hi,

 

I think what you are looking for is something similar to this:

If(
    //If selected value is Amsterdam
    Datacardvalue5.Selected.Value = "Amsterdam",
    //Then value to show is "mailadres"
    "mailadres",

    //Else If selected value is Londen
    Datacardvalue5.Selected.Value = "Londen",
    //Then value to show is "YourOtherValue2"
    "YourOtherValue2",

    //Else If selected value is New York
    Datacardvalue5.Selected.Value = "New York",
    //Then value to show is "YourOtherValue3"
    "YourOtherValue3"
)

 

You should not need to include the last "true, false", as that is a check for
'if true = true, then false'
Which will always resolve to false


You can use the Intellisense suggestions to build If-Else-If checks quite easily, as it will advise you what section of the logic you are currently in.

 

Any questions on it please feel free to shout,

 

Cheers,

ManCat

 




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Use multiple values for choice to textcolumn

Hi,

 

I think what you are looking for is something similar to this:

If(
    //If selected value is Amsterdam
    Datacardvalue5.Selected.Value = "Amsterdam",
    //Then value to show is "mailadres"
    "mailadres",

    //Else If selected value is Londen
    Datacardvalue5.Selected.Value = "Londen",
    //Then value to show is "YourOtherValue2"
    "YourOtherValue2",

    //Else If selected value is New York
    Datacardvalue5.Selected.Value = "New York",
    //Then value to show is "YourOtherValue3"
    "YourOtherValue3"
)

 

You should not need to include the last "true, false", as that is a check for
'if true = true, then false'
Which will always resolve to false


You can use the Intellisense suggestions to build If-Else-If checks quite easily, as it will advise you what section of the logic you are currently in.

 

Any questions on it please feel free to shout,

 

Cheers,

ManCat

 




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

View solution in original post

Dual Super User
Dual Super User

Re: Use multiple values for choice to textcolumn

Hi @Wackmack88 

 

Can you share more details on the control that you have set the value for: If(Datacardvalue5.Selected.Value = "Amsterdam", "mailadres", true, false)
 
Also, if I understood correctly, you have a choice column and you want to add text to other text column based on the values selected in the choice columns.
 
ex:
If location is selected as Amsterdamm and Londen, then you want to store "mailadres,mailadres1" in the text column
 
is this correct?
 
For this you can create a collection which has all the values for Associated location. This could be done on App Start or on Page Visible.
Expression: ClearCollect(MyLocationText,{Location:"Amsterdamm",Text:"mailadres"},{Location:"Londen",Text:"mailadres2"},{Location:"New York",Text:"mailadres1"})
 
The expression on Text Column dataCard "Update" property would be: 
Concat(Filter(MyLocationText,Location in DataCardValue10.SelectedItems.Value),Text,",")
Here, DataCardValue10 is the name of combobox control

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Wackmack88
Level 8

Re: Use multiple values for choice to textcolumn

This is the right solution, thanks for your help!

Now i will clean up my app. The next time i will use your solution.

 

Have a nice day ! 

Helpful resources

Announcements
thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,835)