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
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
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (10,770)