Power Apps Exchange

Please login or click SIGN UP FOR FREE to create your PowerAppsUG account to join this user group.
Expand all | Collapse all

Visible condition on combo box lookup from SP list

Jump to Best Answer
  • 1.  Visible condition on combo box lookup from SP list

    Posted Mar 02, 2021 09:44 AM

    Hello,

    I have the following column in my Power App which is a a multi select looku.


    I have a datacard that should be hidden unless "Research" is selected from the combo box. Usually on I would use the following:

    If(DataCardValue2.SelectedItems,Value ="Research")>0,true,false)

    I assume this does not work because it is a lookup and I cannot figure this out.

    Your help would be appreciated.

    Thanks
    Fernand



    ------------------------------
    Fernand B
    Senior Application Developer
    ------------------------------


  • 2.  RE: Visible condition on combo box lookup from SP list

    Top Contributor
    Posted Mar 03, 2021 12:55 AM
    A multi select column contains an array, so use the in operator instead of =

    ------------------------------
    Will Page
    Technical consultant
    Christchurch, NZ
    ------------------------------



  • 3.  RE: Visible condition on combo box lookup from SP list

    Posted Mar 03, 2021 09:03 AM
    Edited by Ryan Kirk Mar 03, 2021 09:04 AM
    Hi Fernand,

    Here's what I have used for a multiselect dropdown.

    If("Research" in DataCardValue2.SelectedItems.Value,true,false)


    ------------------------------
    Ryan Kirk
    Web Application Specialist
    Madison WI
    6086636745
    ------------------------------



  • 4.  RE: Visible condition on combo box lookup from SP list

    Posted Mar 03, 2021 12:05 PM

    I tried tried "in" but I get the following


    DatacardValue2 is a SP LookUp column, could that be the issue?



    ------------------------------
    Fernand B
    Senior Application Developer
    ------------------------------



  • 5.  RE: Visible condition on combo box lookup from SP list

    Posted Mar 03, 2021 01:10 PM

    Thank Ryan but it doesn't work. When I checked "Allow multiple" I get this:



    ------------------------------
    Fernand B
    Senior Application Developer
    ------------------------------



  • 6.  RE: Visible condition on combo box lookup from SP list

    Top Contributor
    Posted Mar 03, 2021 01:28 PM
    If you're changing the column type in the data source, you should remove and re-add the data card.

    ------------------------------
    Will Page
    Technical consultant
    Christchurch, NZ
    ------------------------------



  • 7.  RE: Visible condition on combo box lookup from SP list

    Posted Mar 03, 2021 02:49 PM
    Still not working. I re-added the DataCard. Would there be an issue with the fact that the lookup is pointing to another list?



    ------------------------------
    Fernand B
    Senior Application Developer
    ------------------------------



  • 8.  RE: Visible condition on combo box lookup from SP list

    Top Contributor
    Posted Mar 04, 2021 05:03 AM
    Hi @Fernand B,
    The underlying Lookup should not be an issue as you are simply dealing with the output of the control - try this(in the Visible property)
    "Research" in DataCardValue2.SelectedItems​

    This is a Boolean (true/false) argument and should be reflected in the Visible property of the control



    ------------------------------
    Warren Belz
    Queensland Australia
    ------------------------------



  • 9.  RE: Visible condition on combo box lookup from SP list

    Posted Mar 04, 2021 08:38 AM
    Hi Warren,

    Anytime I try this I get the following:



    ------------------------------
    Fernand B
    Senior Application Developer
    ------------------------------



  • 10.  RE: Visible condition on combo box lookup from SP list

    Top Contributor
    Posted Mar 04, 2021 04:15 PM

    Hi @Fernand B,

    That was not what I posted - try​

    "Research" in DataCardValue2.SelectedItems


    ------------------------------
    Warren Belz
    Queensland Australia
    ------------------------------



  • 11.  RE: Visible condition on combo box lookup from SP list

    Posted Mar 04, 2021 04:31 PM

    Hi Warren,

    This is what I get. I've tried many variations.



    ------------------------------
    Fernand B
    Senior Application Developer
    ------------------------------



  • 12.  RE: Visible condition on combo box lookup from SP list

    Top Contributor
    Posted Mar 04, 2021 04:42 PM
    @Fernand B,
    Please confirm DataCardValue2 is a Combo Box and also what are its Items​?

    ------------------------------
    Warren Belz
    Queensland Australia
    ------------------------------



  • 13.  RE: Visible condition on combo box lookup from SP list

    Posted Mar 04, 2021 04:55 PM



    Items are pointing to another SO list



    ------------------------------
    Fernand B
    Senior Application Developer
    ------------------------------



  • 14.  RE: Visible condition on combo box lookup from SP list
    Best Answer

    Top Contributor
    Posted Mar 04, 2021 05:17 PM
    @Fernand B,
    Now I can see your structure, try
    "Research" in DataCardValue2.SelectedItems.Type_x0020_of_x0020_Report​​
    ​You might also change your SearchFields to Type_x0020_of_x0020_Report​

    ------------------------------
    Warren Belz
    Queensland Australia
    ------------------------------



  • 15.  RE: Visible condition on combo box lookup from SP list

    Posted Mar 04, 2021 05:28 PM
    That did the trick! Thank very much Warren, I will remember to look out for column names issues if I change them.

    All the best!
    Fernand

    ------------------------------
    Fernand B
    Senior Application Developer
    ------------------------------



  • 16.  RE: Visible condition on combo box lookup from SP list

    Top Contributor
    Posted Mar 04, 2021 06:01 PM
    Thanks @Fernand B,
    You might also ​find this blog of mine useful

    ------------------------------
    Warren Belz
    Queensland Australia
    ------------------------------