web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch lookup column st...
Power Apps
Unanswered

Patch lookup column stopped working after changing language

(0) ShareShare
ReportReport
Posted on by 28

Hi everyone,

 

I am making an app that needs to patch some lookup columns in sharepoint and it did, until I changed the browser language. When I made the app, the browser was set to US english however, most users that will use the app will be using their browser in a different language. To my knowledge this should not pose a problem but for some reason a patch formula just completely breaks. I used the following formula:

ForAll(
Gallery9.AllItems,
Patch(
'test table',
Defaults('test table'),
{
'Project name': TextInput1_4.Text,
'Vergunning ID Test': {                  
     Id: ThisRecord[@ID],
     Value: ThisRecord.ID},
'Project ID Test':{                          
    Id:recIDman,
    Value:recIDman}
}
)
)

 

This works in the US-english version, but when I open the app in the other language it stops working and I get an error saying :

-The function 'Patch' has some invalid arguments
- Invalid argument type. Expecting a record value, but of a different schema

-Your formula is missing a column id.

 

I just don't understand why it gives me this error or how to resolve it. Does anyone have any idea?

 

Thanks in advance.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @gan 

    To start, your formula has the ForAll backward. You are trying to use it like a ForLoop in some development language - which PowerApps is not.  ForAll is a function that returns a table of records based on your iteration table and record schema.

    It is more efficient to use the function as intended and will provide better performance.

     

    When you provide a record for the Lookup column, you supply the Id (the ID of the looked up list record) and the Value (the text value of the column assigned to the Lookup - as defined in your list settings).

     

    In your case you are providing a numeric ID for both the Id and the Value.  Not entirely sure that is the cause of your issue, but it would be worth changing your formula to the following:

    Patch('test table',
     ForAll(Gallery9.AllItems,
     {'Project name': TextInput1_4.Text,
     'Vergunning ID Test': {Id: ID, Value: Text(ID)},
     'Project ID Test': {Id:recIDman, Value: Text(recIDman)}
     }
     )
    )

     

    I hope this is helpful for you.

  • gan Profile Picture
    28 on at

    Thanks @RandyHayes ,

    I tried your code, but sadly it did not work either, altough the error it gives changed to:

    Invalid argument type (Table). Expecting a record value instead.
    The function patch has some invalid arguments.

     

    The strange thing is that your code, just like mine does work when I have my browser settings set to US-english, but not when I have it set to another language.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard