Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Filtered Lookup Column Not Saving Selected Form Value

Posted on by 10

I'm having trouble with a PowerApps form where my filtered lookup column isn't saving the selected value. Here's my setup:

  • I have an "Operational Issues" list with a lookup column "Customer Name" that pulls from a "Customers" list
  • Users need to first select a country, which should then filter the available customers in the dropdown
  • When adding a new record, even though I select a customer from the filtered dropdown, the value isn't being saved to the "Customer Name" column
https://i.imgur.com/Fxjl3so.png
Another screenshot
https://i.imgur.com/OWvUTCH.png
 

Preivous Configuration:
Here's my current Items property for the unfiltered version (which worked, but would shows all customers (200+) with no country filtering):
Choices([@'Operational Issues'].'Customer Name')


Current Configuration with Problem:
The moment I add the filter function and try to filter by country, it doesn't work. In my form, the selected customer value doesn't save to the record.
Filter('Customers',Country.Value = CountryCombo.Selected.Value)

Current Control Properties:
- Customer_DataCard1:
    Control: TypedDataCard
    Variant: fluentV9ComboBoxEditCard
    Layout: vertical
    Properties:
      DataField: ="Customer"
      Default: =ThisItem.'Customer Name'
      DisplayName: =DataSourceInfo([@'Operational Issues'],DataSourceInfo.DisplayName,'Customer Name')
      Required: =true
      Update: =CustomerCombo.Selected
      DisplayMode: =Parent.DisplayMode
      Height: =80
      Width: =582
      X: =1
    Children:
    - CustomerCombo:
        Control: ComboBox
        Variant: pcfdataset
        Properties:
          DefaultSelectedItems: =[Parent.Default]
          InputTextPlaceholder: ="Find a customer"
          Items: =Filter('Customers', Country.Value = CountryCombo.Selected.Value)
          Width: |+
            =Parent.Width -48
          X: =24
          Y: =36
        Children:
        - Title1:
            Control: PowerApps_CoreControls_ComboboxCanvasTemplate_dataField
            Variant: textualColumn
            Properties:
              FieldDisplayName: ="Title"
              FieldName: ="Title"
              FieldType: ="s"
              Order: =1
 
Table structures:
My Operational Issues list structure:
 

 

  • Issue Name (Title): Text column

  • Business Unit: Choice column

  • Country: Choice column

  • Customer Name (changed it from `Customer` like it says in screenshot): Lookup column (points to the Title column in the Customers list)

  • DisplayName: Lookup column (uses Customer column next to it to fetch DisplayName from the Customers list)


  •  
My Customers list Structure:


  • FullName (Title): Text column

  • DisplayName: Text column

  • Country: Choice column
 

Has anyone encountered this issue before? How can I maintain the country-based filtering while ensuring the selected customer value gets properly saved to the lookup column?

 

Thanks in advance for any help!

 
 
  • WarrenBelz Profile Picture
    WarrenBelz 143,591 on at
    Filtered Lookup Column Not Saving Selected Form Value
    Yes - as I mentioned column name changes will give you a few challenges
  • CU19111632-0 Profile Picture
    CU19111632-0 10 on at
    Filtered Lookup Column Not Saving Selected Form Value
    Hi @WarrenBelz
     
    Yes, it somewhat solved my question, had to modify some of the column names but got there in the end. Thank you for your guidance and help!
  • WarrenBelz Profile Picture
    WarrenBelz 143,591 on at
    Filtered Lookup Column Not Saving Selected Form Value
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • Meekou Profile Picture
    Meekou 132 on at
    Filtered Lookup Column Not Saving Selected Form Value

    Your new text content.

  • WarrenBelz Profile Picture
    WarrenBelz 143,591 on at
    Filtered Lookup Column Not Saving Selected Form Value
    Without looking at all the column name changes (not a good idea at the best of times), the Update should be
    {
       Value: CustomerCombo.Selected.Title,
       Id:
       LookUp(
          Customers,
          Title = CountryCombo.Selected.Title
       ).ID
    }
    and the DefaultSelectedItems
    {Title: ThisItem.'Customer Name'.Value}
    Also Lookup columns will continue to cause you unwanted restrictions and complexity (unless you have a specific reason for using them)
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard