Hi all,
I have made a cascading lookup setup. This works fine. I have add a distinct filter to delete the duplicates. The solution is fine, when i my made PowerApp in an English site. Here is the code:
ClearCollect(
collSchools,
{
Id: Distinct(
Filter(
Schools,
Faculty.Id = DataCardValue2.Selected.Id
),
ID
).Result
}
);
Reset(DataCardValue3)
When i use my code in a Dutch site, the lookup column doesn't filter/work on the Id, specify: Faculty.Id.
I saw in the English list the ID is with capital letters and in the Dutch list it is with one Capital letter, Id.
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/global-apps I have checked this blog to change the separator's but nothing seems to work. When i change a dot of command, i get a invalid argument of the code.
Had anyone experience the with a different region / language ?
Hi @Anonymous
Try replacing the commas with semi-colons like so. Hopefully, that'll do the trick.
ClearCollect(
collSchools;
{
Id: Distinct(
Filter(
Schools;
Faculty.Id = DataCardValue2.Selected.Id
);
ID
).Result
}
);;
Reset(DataCardValue3)
Hi Timl,
I tried the same but when i use the extra;, i got three errors, very strange.
Very strange, i tried al the different, semi-colons, specially in the begin, because i need to fix Faculty.Id, there not so much options.
Hi @Anonymous
That sounds strange. Just to confirm, is the SharePoint list that you're connecting to, different to the SharePoint list that works in English?
No, i have a English / Dutch site, with both the same list. In the mainlist, i have two lookup columns.
Everything works fine in the English setup. With the Dutch site, i just made a connection to the English lookup list and the the formula works fine! But the second lookup shows no data anymore so that's not an option now.
This is the syntax for the second column:
Filter(
Choices(Students.School),
Id in First(collSchools).Id
)
Hi @Anonymous
This is strange. Taking your second lookup column, the way I would approach this would be to examine each part of the formula. If you add a datatable and set the Items property to Choices(Students.School), do you see any rows?
If you add a label and set the Text property to First(collSchools).Id, do you see an Id value in the label?
Do you see any rows? Yes, i see al the rows from the source, Schools.
When i add an extra label with: First(collSchools).Id, After the collSchool, i see directly "We didn't find any data."
Hi @Anonymous
I'm guessing the problem here is that First(collSchools).Id isn't returning an Id because collSchools is empty. How are you populating collSchools?
Here, and what i say, this works perfect in a English teamsite, very strange to me.
ClearCollect(
collSchools,
{
Id: Distinct(
Filter(
Schools,
Faculty.Id = DataCardValue2.Selected.Id
),
ID
).Result
}
);
Reset(DataCardValue3)
Sorry @Anonymous, what I was meaning to say was where are you calling the ClearCollect code? Is it on a button?
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
207 | |
188 | |
80 | |
50 | |
38 |
User | Count |
---|---|
305 | |
254 | |
121 | |
73 | |
56 |