cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mary_ann
Helper I
Helper I

Filter out a specific column to update the value

Hi guys,
Desperately looking for help to filter a particular column.

This is the code, I have tried. Basically here I am iterating through all the items in "zoneComboBox_1" and updating "AddProjectItemListTestZoneCountries" data source -> id column = filtered project id column from data source "Temp_PID1" where zone = the selected item from "zoneComboBox_1".

 

ForAll(
       zoneComboBox_1.SelectedItems.Value, 
       UpdateIf(
                AddProjectItemListTestZoneCountries, zone=Value,
                       {
                         id:Filter(Temp_PID1, zone=Value)
                       }
                )
       );

 


From Above code It throwing error (attached screenshot)->"
Incompatible type, The id column in data source you're updating expects a Text type and you're using a Table type" which is true, i just want the filter out particular column i.e, project_id. column from Temp_PID1 collection where zone = selected_item from zone combobox and update AddProjectItemListTestZoneCountries collection column id=project_id from TempPID1 collection.

Thanks a lot.


1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User II
Dual Super User II

Hi @mary_ann,

 

filter returns a table. Change filter to lookup to get a record and then do . and select a column that has the id value (example below)

  id:Lookup(Temp_PID1, zone=Value).id

 


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

 

View solution in original post

2 REPLIES 2
RezaDorrani
Dual Super User II
Dual Super User II

Hi @mary_ann,

 

filter returns a table. Change filter to lookup to get a record and then do . and select a column that has the id value (example below)

  id:Lookup(Temp_PID1, zone=Value).id

 


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

 

View solution in original post

@RezaDorrani thank you so much. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,156)