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 Apps
Suggested Answer

Error in collect

(1) ShareShare
ReportReport
Posted on by
Hi, hope you are well and thanks for reading. 
I need help with a power apps form that is linked to my SHP list. I need that according to the mails that are stored in the Editors list of my ListA, certain fields are edit or read only. 
From what I researched I need to apply in DisplyMode the following configuration:
 If(
    User().Email in UserListWithEdit,
    DisplayMode.Edit,
    DisplayMode.View
)
But when I want to create as collection ListaDeUsuariosConEdicion I have problems because it does not recognize in the ONSTART the Collect nor the ClearColeect it tells me that a +, * or & operator was expected and the name ListaDeUsuariosConEdicion marks it as name not recognized. Someone is so kind to help me please.
Thanks for taking the time to read.
Regards,
Ana
Translated with DeepL.com (free version)
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,968 Moderator on at
    Hi
     
    You need to share that code that has the error please. I have some guesses, but its hard to tell you without seeing a screenshot of the error/code.
     
    Usually this happens, because you are doing a Collect/ClearCollect on something that hasn't been defined before, OR has been defined in other places and dooesn't match.
     
    So please share the code/OnStart please.
     
    Also try this,
     
    At the top of the AppOnStart. Before Any other Code, put ClearCollect(ListaDeUsuariosConEdicion , {});
     
     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard