Dear all,
Struggling with the following.
In a Power App I'm creating a collection (collection_A) which is combining all quote products from different quotes together based on the fact that they have the same customer.
In the collection I want to add an option set field (ProductGroup) which is stored on the Product entity related to the Quote Product.
But I can't seem to find the right syntax to do this.
So I have Quote (entity) >
QuoteProduct (entity) >
Product (entity) - ProductGroup (option set)
The syntax I have now is the following:
ForAll(
Quotes;
ForAll(
Filter(
QuoteProducts;
Quote.Quote = GUID(quote_id)
);
Collect(
collection_A;
{
Quote_ID_A: Quote.Quote;
QuoteProduct_A: QuoteProduct;
QuoteProduct_Product_A: Product.Product;
QuoteProduct_Product_ProductGroup_A: Product.ProductGroup
}
)
)
)
I also tried to use a LookUp:
ForAll(
Quotes;
ForAll(
Filter(
QuoteProducts;
Quote.Quote = GUID(quote_id)
);
Collect(
collection_A;
{
Quote_ID_A: Quote.Quote;
QuoteProduct_A: QuoteProduct;
QuoteProduct_Product_A: Product.Product;
QuoteProduct_Product_ProductGroup_A: LookUp(
Products;
Product = Product;
ProductGroup
)
}
)
)
)
Doesn't work either.
Is there anybody who can tell me what the right syntax should be?
The datesource is CDS and the entities and fields are coming from Dynamics 365 CE
Appreciating the help!
Awaiting your response.
Best regards,
MWierckx