cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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)


 

 

 

Highlighted
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

Highlighted

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?

Highlighted
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
)

 

Highlighted

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?

Highlighted
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."

Highlighted

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?

Highlighted
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)
Highlighted

Sorry @Anonymous, what I was meaning to say was where are you calling the ClearCollect code? Is it on a button?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,430)