Hi,
I have an issue in a galleries Items property, where I need to use a disambiguation operator to reference an id that is outside of a lookup scope but within that add columns formula.
The formula looks something like
AddColumns(
//Ungroup below based on unique Job ids
Ungroup(
//add columns to our collection called Job Id, it is a lookup to that record
AddColumns(
colOrder,
"Job Id",
Filter('Dataverse Jobs','Order No.'=varOrder).'Dataverse Job'
),
"Job Id"
),
"Job Type",
//Lookup the datasource, with the recently created Job Id above, to find additional details
LookUp('Dataverse Jobs', 'Dataverse Job' = creaa_dataversejobid).JobType
)
In the above, I have a collection that I am adding a column called Job Id filtered by some values already in the collection.
I want to use this newly created Job Id to Add an additional column to get more details. The other criteria to get the Job Id originally is not exact enough to get the right details (Job Type, in this example) for this specific record. But referencing this Job Id returns an error in the monitor "The right side of the equal needs to be a constant value".
I believe this is because the id I need to reference is within that modified collection formula, but I don't have a specific source to reference with an @ because if I put the above into 2 collections and use the disambiguation operator (@) to reference a named source, it works as expected.
ClearCollect(
colWithJobId,
AddColumns(
colOrder,
"Job Id",
Filter('Dataverse Jobs','Order No.'=varOrder).'Dataverse Job'
),
"Job Id"
)
);
ClearCollect(
colWithJobType,
AddColumns(
colWithJobId,
"Job Type",
//notice the @ disambiguation below, with the collection name
LookUp('Dataverse Jobs', 'Dataverse Job' = colWithJobId[@creaa_dataversejobid]).JobType
)
I want to avoid creating excessive collections, and would like to simply display the above in the Items property of the gallery.
How to I use a disambiguation within an AddColumns formula where the source I need to disambiguate is only generated within that AddColumns?

Report
All responses (
Answers (