web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dropdown filter from l...
Power Apps
Unanswered

Dropdown filter from lookup field

(2) ShareShare
ReportReport
Posted on by 41

Hi!

 

I´m trying to filter a dropdown base on a second field on the same lookup table.

 

These are my cotrols:

Data Source: Solicitudes

Combo Box Name:cboColaboradores

 

Items properties: Choices(Solicitudes.Colaboradores)  --This shows a name list from a Sharepoint Lookup Field.

 

This lookup fied has another field name Colaborador_x003a_status with values like A(Active) and I(Inactive)

 

I tried to filter by these Status.

 

Filter(Choices(Solicitudes.Colaboradores),Colaborador_x003a_Status.Value =  "A")  ---- result=nothing

 

also tried:

Filter(Choices(Solicitudes.Colaboradores),Colaborador_x003a_Status =  "A")  -- but says "Invalid argument type"

 

if i test the Status values using Choices(Colaborador_x003a_Status) it shows theses values, meaning the values are there

 

it is the type?

 

What i´m missing?

 

Thanx in advance!

 

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @joeljohn,

    Could you please share a bit more about Colaborador status column in your SP list? Is it a Choice type column or a Single line of text type column?

    Do you add another field for the LookUp column (Colaboradores) within your SP list?

    I have made a test on my side, I think there is something wrong with the formula that you provided. The result the Choices(Solicitudes.Colaboradores) formula returned only contains Id property and Value property, it does not contain Colaborador_x003a_status property.

    Actually, if you add another field for the LookUp field (Colaboradores) within your SP list, it would add another field within your SP list. The new added column is based on the LookUp column.

    If you want to filter your LookUp column values based on the Colaborador_x003a_status property through the formula that you provided, I afraid that there is no way to achieve your needs.

    As an alternative solution, please take a try with the following workarond:3.JPG

    Set the Items property of the Combo Box control to following:

    Filter(
    Choices('20181121_LookUpList'.Colaboradores),
    Value in Filter('20181121_case8','Colaborador status'="A").EmpName
    )

    Note: The '20181121_LookUpList' represents the SP list contains the LookUp column (Colaboradores). The '20181121_case8' represents the SP list your LookUp column (Colaboradores) reference values from. The EmpName represents the column in '20181121_case8' which your LookUp column (Colaboradores) reference values from.

    On your side, you should type the following formula within the Items property of the Combo Box control:

    Filter(
    Choices(Solicitudes.Colaboradores),
    Value in Filter('LookUpList', Colaborador_x003a_status ="A").ReferencedColumn /* <-- I assume that the Colaborador_x003a_Status column is a Single line of text column in your LookUp list */
    )

    Note: The 'LookUpList' represents the SP list which LookUp column (Colaboradores) reference values from. The ReferencedColumn represents the column in your LookUp List, which your LookUp column (Colaboradores) reference values from.

     

    Best regards,

    Kris

  • joeljohn Profile Picture
    41 on at

     

    Hi Kris, 

     

    Thanx for your detailed solution...

     

    First:

    1. This is the Solicitudes SP list

    2. The Colaborador field is a lookup from the SP List BDEmpleados(Name field)

    3. The Colaborador:admsts_codigo field (Status field) is a second field from the SP List List BDEmpleados(Status Field)

     

    Solicitudes fields

    Captura.PNG

     

    The Colaborador field

    Captura.PNG

     

    The Colaborador:amdsts_codigo field            

    Captura.PNG

     

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @joeljohn,

    Just as I mentioned above, if you want to filter your LookUp column values based on the Colaborador:admsts_codigo field through the formula that you provided, I afraid that there is no way to achieve your needs within PowerApps.

    The result the Choices(Solicitudes.Colaborador) formula returned only contains Id property and Value property, it does not contain Colaborador:admsts_codigo property.

    As an alternative solution, please type the following formula within the Items property of the Combo Box control:

    Filter(
    Choices(Solicitudes.Colaborador),
    Value in Filter(BDEmpleados, Colaborador:admsts_codigo ="A").NOMBRE_x0020_Y_x0020_APELLIDO
    ) 

     

    Best regards,

    Kris 

  • joeljohn Profile Picture
    41 on at

    HI kRIS ,

     

    Thanx for your dedication.

     

    Note: It uses plurals : 

    Solicitudes.Colaboradores insted of Solicitudes.Colaborador

    I tried the formula below,  but  keep getting errors

    Filter(
     Choices(Solicitudes.Colaboradores), 
     Value in Filter(BDEmpleados,Colaborador_x003a_admsts_codigo = "A").Colaborador_x003a_Nombre_Apellido
    )

    Errrors:

    Captura.PNG

    The allow argments ar exactin and in.

     

    I also tried Text() and Value() Funtions.

     

    When using Colaborador_x003a_admsts_codigo.Value the error goes away, but the result is empty.

     

    I also created a UpdateContext variable to filter.

    UpdateContext(StatusList, "A") for using it as:

    Filter(
     Choices(Solicitudes.Colaboradores), 
     Value in Filter(BDEmpleados,Colaborador_x003a_admsts_codigo in StatusList).Colaborador_x003a_Nombre_Apellido
    )

    Any clue?

     

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @joeljohn,

    Which type is the Colaborador_x003a_admsts_codigo column in your BDEmpleados list? Is it a Choice type column?

    If the Colaborador_x003a_admsts_codigo column is a Choice type column in your BDEmpleados list, please take a try with the following workaround:

    Set the OnVisible property of the first screen of your app to following:

    ClearCollect(BDEmpleadosCollection, BDEmpleados)

    Set the Items property of the Combo Box control to following:

    Filter(
     Choices(Solicitudes.Colaboradores), 
     Value in Filter(BDEmpleadosCollection, Colaborador_x003a_admsts_codigo.Value = "A").Colaborador_x003a_Nombre_Apellido
    )

    check if the issue is solved.

     

    Best regards,

    Kris

  • joeljohn Profile Picture
    41 on at

    Hi Kris!

     

    These are the types o Nombre_Apellido and admsts_codigo of BDEmpleados List

    Captura.PNG

    This is the data of the BDEmpleados list

    Captura2.PNG

     

    The formula has no errors but still the results are nothing..

    don´t know what else to try

     

  • slim_au Profile Picture
    2 on at

    Did you ever solve this?

  • jaiswalmayur Profile Picture
    5 on at
    Filter(
    Choices('20181121_LookUpList'.Colaboradores),
    Value in Filter('20181121_case8','Colaborador status'.Value="A").EmpName
    )

    so if you noticed i added .Value that is how it should be and it worked for me

  • jaiswalmayur Profile Picture
    5 on at
    Filter(
    Choices('20181121_LookUpList'.Colaboradores),
    Value in Filter('20181121_case8','Colaborador status'.Value="A").EmpName
    )

    so if you noticed i added .Value that is how it should be and it worked for me
  • ManiLive Profile Picture
    41 on at

    Thank you.  That was a great help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard