cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
galdezanni
Advocate II
Advocate II

Filter data for a collection - Dataverse

Hey guys,


I'm using Dataverse as a database and I came across a problem:

 

I'm trying to load the filtered data from the "Item de Verificação" table, because the "ID Achado" selected in the gallery item is the same as "ID Achado" in the table, knowing that the "Item de Verificação" table has a lookup column with the table "Achado".

 

I tried it in two ways, straight through Collect, but I had a problem with the delegation; using a ForAll, even when running, clicking the button where this function is in OnSelect does not load the data.

 

Collect(ItemEdicao;Filter('Item de Verificação';Gallery1_6.Selected.'ID Achado' in 'Item de Verificação'.Achado.'ID Achado'))

 

 

 

ForAll(
'Item de Verificação';
If(
Gallery1_6.Selected.'ID Achado' in 'Item de Verificação'.Achado.'ID Achado' ;
Collect(
ItemEdicao;
ThisRecord.'Item de Verificação (new_itemdeverificacao)'
    )
  )
)

 


What could be wrong? I'm not sure how to work with Dataverse on Canvas.

 

Another point that I realized, is that with Dataverse I had to use "in" in the comparison, however when I used SQL Serve I used "=".

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @galdezanni ,

 

Please provide the following two information.

1\ The formula of your Gallery1_6 's Items property

2\ What's data type of 'ID Achado' column? Is it a Text column?

 

In addition , please try this formula:

 

 

ClearCollect(ItemEdicao;Filter(ForAll('Item de Verificação';If(Gallery1_6.Selected.'ID Achado' in ThisRecord.Achado.'ID Achado';ThisRecord;Blank()));!IsBlank('ID Achado')))

 

 

Or

 

 

ClearCollect(ItemEdicao;Filter(ForAll('Item de Verificação';If(Text(Gallery1_6.Selected.'ID Achado') in ThisRecord.Achado.'ID Achado';ThisRecord;Blank()));!IsBlank('ID Achado')))

 

 

 

If they do not work, please provide the above two points of information.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @galdezanni ,

 

Please provide the following two information.

1\ The formula of your Gallery1_6 's Items property

2\ What's data type of 'ID Achado' column? Is it a Text column?

 

In addition , please try this formula:

 

 

ClearCollect(ItemEdicao;Filter(ForAll('Item de Verificação';If(Gallery1_6.Selected.'ID Achado' in ThisRecord.Achado.'ID Achado';ThisRecord;Blank()));!IsBlank('ID Achado')))

 

 

Or

 

 

ClearCollect(ItemEdicao;Filter(ForAll('Item de Verificação';If(Text(Gallery1_6.Selected.'ID Achado') in ThisRecord.Achado.'ID Achado';ThisRecord;Blank()));!IsBlank('ID Achado')))

 

 

 

If they do not work, please provide the above two points of information.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,828)