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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Ayuda con el simbolo de =
Power Apps
Unanswered

Ayuda con el simbolo de =

(1) ShareShare
ReportReport
Posted on by 4
Sigo con el error, edite esta misma porque no se como agregar nuevamente imagenes, y agregue los captures despues de agregar lo que me sugeriste..


Alguien sabe porque el simbolo = e da error? estoy tratando guardar las repuesta de una colección y luego compararla con otra colección que tiene las correctas.
 
ClearCollect(
    colResultados;
    ForAll(
        colRespuestasUsuario;
        {
            PreguntaID: PreguntaID;
            RespuestaSeleccionada: RespuestaSeleccionada;
            RespuestaCorrecta: LookUp(PreguntasAleatorias; PreguntaID = PreguntaID).Correcta;
            EsCorrecta: If(
                LookUp(PreguntasAleatorias; PreguntaID = PreguntaID).Correcta = RespuestaSeleccionada;
                true;
                false
            )
        }
    )
);
 
Set(
    totalCorrectas;
    CountRows(Filter(colResultados; EsCorrecta = true))
);
 
Set(
    porcentaje;
    (totalCorrectas / CountRows(colRespuestasUsuario)) * 100
);
 
If(
    porcentaje >= 70;
    Notify("¡Felicidades! Has aprobado la evaluación."; NotificationType.Success);
    Notify("No has aprobado la evaluación. Intenta de nuevo."; NotificationType.Error)
);
Categories:
I have the same question (0)
  • MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 on at
    It is because there is naming ambiguous. the system don't know from where the use. you can solve that using As in the for All.


    it will be like that
     
    ClearCollect(
        colResultados;
        ForAll(
            colRespuestasUsuario As Resultado;
            {
                PreguntaID: Resultado.PreguntaID;
                RespuestaSeleccionada: Resultado.RespuestaSeleccionada;
                RespuestaCorrecta: LookUp(PreguntasAleatorias; PreguntaID = Resultado.PreguntaID).Correcta;
                EsCorrecta: If(
                    LookUp(PreguntasAleatorias; PreguntaID = Resultado.PreguntaID).Correcta = Resultado.RespuestaSeleccionada;
                    true;
                    false
                )
            }
        )
    );
     
    Set(
        totalCorrectas;
        CountRows(Filter(colResultados; EsCorrecta = true))
    );
     
    Set(
        porcentaje;
        (totalCorrectas / CountRows(colRespuestasUsuario)) * 100
    );
     
    If(
        porcentaje >= 70;
        Notify("¡Felicidades! Has aprobado la evaluación."; NotificationType.Success);
        Notify("No has aprobado la evaluación. Intenta de nuevo."; NotificationType.Error)
    );


    If there still error is because the type of the data is different.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard