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 / Comparison of control ...
Power Apps
Unanswered

Comparison of control type with text type

(0) ShareShare
ReportReport
Posted on by 2

I'm having trouble comparing control with text type.

What I need is the following: in a powerapps form I need when "Contract" = "Contract.Text(Input)", to return the values โ€‹โ€‹of the "resources" that were selected.

The combobox is just the resources that will be selected, I use the following codes:

 

onchange = UpdateContext({ContratoSelecionado: CardContrato_1.Text})


items = Filter(ValoresContratos;Contrato = ContratoSelecionado)



bug powerapps.jpg


Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @ledur17 - what is the data type for the "Contrato" field? (single line text, number, single-select choice, single-select lookup etc)

  • ledur17 Profile Picture
    2 on at

    its single line text

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @ledur17 - as I understand it, you want to filter a ComboBox control based on the value entered in a Text Input control. 

     

    If you must use a local Context Variable, then you should be initialising the Variable on the OnChange property of the Text Input control, not on the ComboBox control. For example:

     

     

    UpdateContext({ContratoSelecionado: Self.Text})

     

     

    In addition, remember to check the properties pane for the ComboBox and ensure the "Primary text" dropdown is returning the column you need:

     

    Amik_0-1713570614554.png

     

    On a related note, I do not think this is a good idea because the Filter will only return an exact match. Consider using the Search or StartsWith function instead:

     

     

    Filter(
     ValoresContratos;
     Len(ContratoSelecionado) = 0 || StartsWith(
     'The field you want to display';
     ContratoSelecionado
     )
    )

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 339 Most Valuable Professional

#2
11manish Profile Picture

11manish 180

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard