cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Problem with region / language with the syntax

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 ?

14 REPLIES 14
timl
Super User III
Super User III

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)


 

 

 

Anonymous
Not applicable

Hi Timl,

 

I tried the same but when i use the extra;, i got three errors, very strange.

 

Syntax error.png

 

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. 

 

Powerapp in Dutch site.pngPowerapp in English site.png

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?

Anonymous
Not applicable

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?

Anonymous
Not applicable

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?

Anonymous
Not applicable

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?

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,551)