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 / Invalid name collect f...
Power Apps
Unanswered

Invalid name collect function

(0) ShareShare
ReportReport
Posted on by 175

Hello guys,


I have a problem creating collections "Collect(clPlanejamentoErroRegistroEquipePlan; 1)", this code structure was working perfectly, but now, for this case, it is no longer accepting the name that I am passing to the collection, he says "the name is not valid, the identifier is not recognized".

 

 

 

 

ForAll(
 clPlanejamentoEquipePlanIncluir;
 If(
 IsError(
 Patch(
 '[dbo].[EquipePlanejamento]';
 Defaults('[dbo].[EquipePlanejamento]');
 {
 idEquipePlanejamento: If(
 Max(
 '[dbo].[EquipePlanejamento]';
 idEquipePlanejamento
 ) >= 1;
 Max(
 '[dbo].[EquipePlanejamento]';
 idEquipePlanejamento
 ) + 1;
 1
 );
 idServidor: idServidor;
 nrClasse: 4;
 
 idDemanda: glPlanejamentoConsulta.Selected.idDemanda
 }
 )
 ) = true;
 Collect(
 clPlanejamentoErroRegistroEquipePlan;
 1
 );
 Blank()
 )
);;
If(
 CountRows(clPlanejamentoErroRegistroEquipePlan) > 0;
 Notify(
 "Erro no Registro da Equipe de Planejamento, comunicar imediatamente o responsável!!! ";
 NotificationType.Error
 );;
 Email.SendEmail(
 Concatenate(
 usuarioLogadoEmail;
 ";";
 LookUp(
 '[dbo].[Servidor]';
 idFuncaoServidor = 6;
 dsEmail
 )
 );
 "Erro no registro da equipe de Planejamento da Demanda nº: " & varPlanejamentoIdPlanejamentoAtual & Now();
 "Erro no registro da equipe de Planejamento da Demanda nº: " & varPlanejamentoIdPlanejamentoAtual & " - " & Now() & " - executor: " & usuarioLogadoNome & " | Id: " & usuarioLogadoIdServidor & " | Matrícula: " & usuarioLogadoMatricula & " - " & Self.Tooltip
 );
 Notify(
 "Equipe de Planejamento registrada com sucesso!!! ";
 NotificationType.Success
 )
 );;

 

 

Did they know what could be happening?

 

Does PowerApps have any limit on the number of variables / collections?

 

I hope you can help me.

 

Thanks,

Categories:
I have the same question (0)
  • WillPage Profile Picture
    2,339 Super User 2026 Season 1 on at

    Your formula seems more complicated than it needs to be.

    You can try something like this:

    IfError(ForAll(
     clPlanejamentoEquipePlanIncluir;
     Patch(
     '[dbo].[EquipePlanejamento]';
     Defaults('[dbo].[EquipePlanejamento]');
     {
     idEquipePlanejamento: If(
     Max(
     '[dbo].[EquipePlanejamento]';
     idEquipePlanejamento
     ) >= 1;
     Max(
     '[dbo].[EquipePlanejamento]';
     idEquipePlanejamento
     ) + 1;
     1
     );
     idServidor: idServidor;
     nrClasse: 4;
     
     idDemanda: glPlanejamentoConsulta.Selected.idDemanda
     }
     )
     
     );; Notify(
     "Equipe de Planejamento registrada com sucesso!!! ";
     NotificationType.Success
     );
    		 Email.SendEmail(
     Concatenate(
     usuarioLogadoEmail;
     ";";
     LookUp(
     '[dbo].[Servidor]';
     idFuncaoServidor = 6;
     dsEmail
     )
     );
     "Erro no registro da equipe de Planejamento da Demanda nº: " & varPlanejamentoIdPlanejamentoAtual & Now();
     "Erro no registro da equipe de Planejamento da Demanda nº: " & varPlanejamentoIdPlanejamentoAtual & " - " & Now() & " - executor: " & usuarioLogadoNome & " | Id: " & usuarioLogadoIdServidor & " | Matrícula: " & usuarioLogadoMatricula & " - " & Self.Tooltip
     );;
    		Notify(
     "Erro no Registro da Equipe de Planejamento; comunicar imediatamente o responsável!!! ";
     NotificationType.Error
     )
    	)
  • galdezanni Profile Picture
    175 on at

    First thanks for the answer.

     

    I tested the solution but did not perform as expected, I think that the "IfError" function may have a problem when applied together with "ForAll".

     

    Thanks!

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
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard