Delegation – User in Collection
-
Delegation – User in Collection
Delegation – User in Collection
Fabian Heil
Fabian HeilNov 18, 2022 10:21 AM
In many cases, i am collecting multiple users in a collection (Dataverse lookup to Users table). For …
1. Delegation – User in CollectionFabian Heil
Posted Nov 18, 2022 10:21 AM
In many cases, i am collecting multiple users in a collection (Dataverse lookup to Users table).
For these users i want to collect another collection. The only way i was getting it to work, is using ForAll and the “IN” operator with a concatted email adresses.
This is not delegable.Do you have any better way to achieve this with delegation?
——————————
Fabian Heil
——————————2. RE: Delegation – User in Collection
Top Contributor
Warren Belz
Posted Nov 21, 2022 01:32 AM
@Fabian Heil,
Firstly, please post all code in Text – I cannot guarantee this for spelling as I OCR’d it from a very small image. I have assumed your code is valid, although I am puzzled why you have used Concat when you can use the in filter directly on the collection table (still not Delegable however)ā. I have “pre-filtered” with the Delegable part (the date range) and this needs to return less than your Delegation limit to allow the bottom filter to return the full data set (there is no workaround if it does not).
Note also that a Collection is a Delegation limit in itself.
With(
{
wDay:
DateAdd(
varFirstDayOfWeek,
6,
Days
)
},
With(
{
wList:
Filter(
‘RIS – BTB Mitarbeiters’,
Datum >= varFirstDayOfWeek &&
Datum <= wDay
)
},
ForAll(
Filter(
wList,
Mitarbeiter.’PrimƤre E-Mail-Adresse’ in
Concat(
colETimeMitarbeiter,
Mitarbeiter.’PrimƤre E-Mail-Adresse’,
“;”
)
) As aCol,
Collect(
colETimeSchichten,
{
rtID: aCol.’RIS – BTB Mitarbeiter’,
rtTvp: aCol.’BTB ID’
}
)
)
)
)ā——————————
Warren Belz
Queensland Australia
——————————3. RE: Delegation – User in Collection
Top Contributor
Warren Belz
Posted Nov 22, 2022 01:45 AM
@Fabian Heil,
āFirstly, can I ask again that you please post your code in Text – your image is almost too small to read, however I see this is not the code I provided to minimise the Delegation effect.
As I noted, provided the data set produced by the With() filter is smaller than your Delegation limit, the rest of the filter will work on this data set locally, so not subject to Delegation.
If there was a better solution, I would have provided it.——————————
Warren Belz
Queensland Australia
——————————4. RE: Delegation – User in Collection
Fabian Heil
Posted Dec 13, 2022 02:47 AM
Hi Warren, thank you very much. In my first case, i got it to work with an adjusted version of your provided code. I have another one, where i dont find the solution.
Do you have an idea here?ClearCollect(colOffeneUrlaubsantrƤgeFreigaben,Filter(‘AZE – UrlaubsantrƤge’,Mitarbeiter.’PrimƤre E-Mail-Adresse’ in Concat(colMitarbeiterVertretungen, Mitarbeiter.’PrimƤre E-Mail-Adresse’, “;”) && Status_Antrag = “Eingereicht”))
——————————
Fabian Heil
——————————
Sorry, there were no replies found.
The discussion ‘Delegation – User in Collection’ is closed to new replies.