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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Save Filtered Lookup V...
Power Apps
Answered

Save Filtered Lookup Value in List Custom Form

(0) ShareShare
ReportReport
Posted on by

Hi Team , 

 

We are filtering the Request Type Column value using below Process Items: Distinct(Filter(lkp_TransferRequestType,Material_Details = materialDetailsVal.Selected.Value).Title,Title)

 

after submitting the form, this column value not saving to the List . 

 

Please help me to resolve this Issue .

 

Please let me know if needs more details 

 

Regards,

Mahesh.

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Anonymous,

    Could you please share a bit more about your scenario?

    Could you please share a bit more about the Request Type column? Is it a Choice type column or a LookUp type column?

    Where do you put the formula that you provided?

    I suppose that the Request Type column is a Choice type column, and you type the formula you provided within the Items property of the Combo Box control within the Request Type Data card, is it true?

    If the Request Type column is a Choice type column (which don't enable multiple selections) in your SP list, please take a try with the following workaround:

    Set the Items property of the ComboBox control (ComboBox1) to following:

    Distinct(Filter(lkp_TransferRequestType,Material_Details = materialDetailsVal.Selected.Value).Title,Title) /* <-- The formula you provided */

    Set the Update property of the Request Type Data card (which contains above ComboBox control) to following:

    {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Value: ComboBox1.Selected.Value
    }

    If the Request Type column is a LookUp column, please set the Update property of the Request Type Data card (which contains above ComboBox control) to following:

    {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: LookUp('YourLookUpList', ReferencedColumn= ComboBox1.Selected.Value, ID),
     Value: ComboBox1.Selected.Value
    }

    Note: The 'YourLookUpList' represents the SP list the Request Type column references values from. The ReferencedColumn represents the Column in the 'YourLookUpList' list the Request Type column references values from.

     

    Please also check and see if the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/Connecting-to-Data/Lookup-Field-not-saving-value-when-saving-NewForm/m-p/147560

    Please also check if the following blog would help in your scenario:

    https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

     

    Best regards,

    Kris

     

  • Community Power Platform Member Profile Picture
    on at

    Hi Kris, 

     

    Request Type is Lookup type Column in PowerApps created List . 

    I am using this column Items(Request Type) property to get the filtered values .

     

    I could able to use below formula at Datacard 'Update" Property , But No Luck 

    {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: LookUp(lkp_TransferRequestType, Material_Details= transferReqTypeVal.Selected.Result, ID),
     Value: transferReqTypeVal.Selected.Result
    }

    Please help me .

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Hey Kris, 

    Thanks a ton, 

    It is working with below formula .

     

    {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: LookUp(
     lkp_TransferRequestType,
     transferReqTypeVal.Selected.Result = Title,
     ID
     ),
     Value: transferReqTypeVal.Selected.Result
    }

    Regards, 

    Mahesh

  • Community Power Platform Member Profile Picture
    on at

    Hi @v-xida-msft,

     

    For the above column (Lookup) - In Edit mode , I could not able to get the loaded value.

    I am assigning look up column saved value to another text box , It is showing as empty in page load

     

    dcv_WorkOrderNumber.Default=TransferReqTypeVal.Selected.Result

     

    Based on Transfer Request Type value selection , I am hiding some other controls in the Page . It is working as expected in NewMode , but not in Edit mode because TransferReqTypeVal.Selected.Result is as well empty in edit mode . 

     

    Please find the attached snapshot for reference .

     

    Regards,

    Mahesh.

     

  • JeffCGrd Profile Picture
    14 on at

    I had this same issue recently and after looking at what is returned by Choices() I noticed it always returns objects with an "Id" and a "Value" field.   The Filter() in my Items property returned just the elements from my list.  I was able to get the values to start saving by using RenameColumns() to change the "ID" to "Id" and "Title" to "Value".  Then my values started saving as I would expect with the Update property as DataCardValue.Selected.

    From you example this might work:
    {lookup control}.Items=RenameColumns(Distinct(Filter(lkp_TransferRequestType,Material_Details = materialDetailsVal.Selected.Value).Title,Title), "ID", "Id", "Title", "Value")
    {dataCard}.Update = {lookup control}.SelectedItem

    It worked for both my Drop Down Lists and my Lookup multi-select controls.

  • vishalgoyal2472 Profile Picture
    57 on at

    @v-xida-msft 
    Thanks for your reply, its working for me in case of single select but if we have to save multivalue in lookup , how to do that?

  • Stijn007 Profile Picture
    155 on at

    Hello @v-xida-msft ,

     

    I have a simular case but with dropdownlist. (doesn't have the update function lik a combobox) 

     

    the user selects an item in the browsegallery and it navigates to the "edit screen". 

     

    I Changed the items property of the dropdownlist. (filtered on another list with user data. )

    ShowColumns(Filter(gebruikers;Diensten.Value = "CMT Niv3"); "NaamGebruike") 

    Because of that ,i assume that the submitform function doesn't work any more. In the editform, the columns type are lookup columns. Can also be a raison? 

     

    I tried to achieve it with the on change function but it doesn't work. The list isn't upated. 

    When i paste it into the update function of the datacard. It doesn't work as well.

     

    Schermafbeelding 2019-12-28 om 12.21.28.png

     

     

     

  • Stijn007 Profile Picture
    155 on at

    Hello, 

     

    I fugured out to filter the choices of the dropdown (based on a value in another list) 

    Then I could use submitform again and don't have to patch. 

     

     

  • gujjaL Profile Picture
    6 on at

    Will this work for multi select dropdown or ComboBox?

  • Stijn007 Profile Picture
    155 on at

    @gujjaL 

     

    my solution works with multiple selection for dropdown. 

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard