cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AymaneM
Frequent Visitor

Filter in two tables with Id : ClientRequestId issue

Hi, help me pleases : 

i have 2 tables in a excel file :   Commandes and LigneDeCommande

The first one is for ordres and the second contain the products in each order.

 

Commandes : Num_commande (id) , ....

LigneDeCommande = Id_LDC (id),  Num_commande, Id_produits....

 

I need to show in commandes gallery the number of products in each items(order)

 

Sum(
ForAll(
Filter(Lignesdecommande;Num_commande in ThisItem.Num_commande);
1
);
Value
) &" "& "Articles - Total commande : " & ThisItem.Montant_total_ttc & " " & "MAD"

 

The Message errors are : 

Failed commands: expression "Num Command eq null" is not supported. clientrequestid c9fdcc27 ....

 

and 

 

Failed commands: filter clause not supported only <<eq>>, <<ne>>, <<contains>> clauses are currently supported

 

The code wokrs fine it show the right number but when executiong the app on the mobile, i have a lot of errors.0 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@AymaneM,

Could you please show me your complete data set, just give a sample?

I am not quite sure the "ThisItem.Montant_total_ttc".

Do you mean that these 2 Tables shares the same column 'Num_commande'?

If Commandes and LigneDeCommande has the same column named 'Num_commande, please consider modify your formula as below:

Sum(
ForAll(
Filter(Lignesdecommande;Num_commande = ThisItem.Num_commande);
1
);
Value
) &" "& "Articles - Total commande : " & ThisItem.Montant_total_ttc & " " & "MAD"

Note: Please replace the operator "in" with "=".

Regards,

Qi

View solution in original post

4 REPLIES 4
AymaneM
Frequent Visitor

Thanks in advance

v-qiaqi-msft
Community Support
Community Support

Hi@AymaneM,

Could you please show me your complete data set, just give a sample?

I am not quite sure the "ThisItem.Montant_total_ttc".

Do you mean that these 2 Tables shares the same column 'Num_commande'?

If Commandes and LigneDeCommande has the same column named 'Num_commande, please consider modify your formula as below:

Sum(
ForAll(
Filter(Lignesdecommande;Num_commande = ThisItem.Num_commande);
1
);
Value
) &" "& "Articles - Total commande : " & ThisItem.Montant_total_ttc & " " & "MAD"

Note: Please replace the operator "in" with "=".

Regards,

Qi

View solution in original post

Thanks Sir for your reply.

 

Its works with "="

 

I still have one error :

 

Failed commands: expression "Num Command eq null" is not supported. clientrequestid c9fdcc27 ....

 

Yes they have the same column "Num_commande"

 

here is an simple :

 

Commandes :

Num_commande       Montant_total_ttc

CDM1001                     2000

CDM1002                     4560

 

LigneDeCommande :

 

ID_LDC           Num_commande     ID_product

LDC1001         CDM1001                P1001

LCD1002         CDM1001                P1002

LDC1003         CDM1002                P1010

 

 

In each items of gallery i need to show :

 

&" "& "Articles - Total commande : " & ThisItem.Montant_total_ttc & " " & "MAD" = 

4 Articles - Total commande : 4560 MAD

 

The formula works great, the label contains the right data exept the error in the beginin.

 

 

AymaneM
Frequent Visitor

I solved the issue by :

replacing

 

Filter(Lignesdecommande;Num_commande = ThisItem.Num_commande);

 

by 

Filter(Lignesdecommande; Text(Num_commande) = ThisItem.Num_commande);

 

I dont know why if you have an explanation ???

 

"Num_commande" is text in both tables (excel)

 

Thank for your time Sir.

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (71,354)