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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Validating data from s...
Power Apps
Unanswered

Validating data from sharepoint columns in a loop

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have a problem because I would like to check the validation of 25 values from one record in a loop . Here is my code and it doesn't work because it doesn't find the ThisRecord context. Does anyone have any idea how this can be solved?

ClearCollect(
ColumnNames,
"Answer 1", "Answer 2", "Answer 3", "Answer 4", "Answer 5",
"Answer 6", "Answer 7", "Answer 8", "Answer 9", "Answer 10",
"Answer 11", "Answer 12", "Answer 13", "Answer 14", "Answer 15",
"Answer 16", "Answer 17", "Answer 18", "Answer 19", "Answer 20",
"Answer 21", "Answer 22", "Answer 23", "Answer 24", "Answer 25"
);
ForAll(
ColumnNames,
If(
IsEmpty(LookUp(ev_SP_List_Uhde_Gemba_Walk_Main, 'Identyfikator (ID)' = Gallery2.Selected.ID).ThisRecord),
Notify(ThisRecord.Value & " is missed")
)
);
Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,560 Super User 2025 Season 2 on at
    Re: Validating data from sharepoint columns in a loop

    hey @ShockWave21 

     

    can u try this please:

    Set(varRecord, LookUp(ev_SP_List_Uhde_Gemba_Walk_Main, 'Identyfikator (ID)' = Gallery2.Selected.ID));
    
    
    ClearCollect(ColumnNames,
     "Answer 1", "Answer 2", "Answer 3", "Answer 4", "Answer 5",
     "Answer 6", "Answer 7", "Answer 8", "Answer 9", "Answer 10",
     "Answer 11", "Answer 12", "Answer 13", "Answer 14", "Answer 15",
     "Answer 16", "Answer 17", "Answer 18", "Answer 19", "Answer 20",
     "Answer 21", "Answer 22", "Answer 23", "Answer 24", "Answer 25"
    );
    
    
    ForAll(ColumnNames, 
     If(
     IsEmpty(varRecord[@Value]),
     Notify(Value & " is missing", NotificationType.Warning)
     )
    );
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • ShockWave21 Profile Picture
    on at
    Re: Validating data from sharepoint columns in a loop

    ShockWave21_0-1715942136159.png

     

  • MuhammadAizaz Profile Picture
    53 on at
    Re: Validating data from sharepoint columns in a loop

    Hello @ShockWave21 ,
    Can you check this code.

    ClearCollect(
    ColumnNames,
    ["Answer 1", "Answer 2", "Answer 3", "Answer 4", "Answer 5",
    "Answer 6", "Answer 7", "Answer 8", "Answer 9", "Answer 10",
    "Answer 11", "Answer 12", "Answer 13", "Answer 14", "Answer 15",
    "Answer 16", "Answer 17", "Answer 18", "Answer 19", "Answer 20",
    "Answer 21", "Answer 22", "Answer 23", "Answer 24", "Answer 25"]
    );

    ForAll(
    ColumnNames,
    If(
    IsBlank(LookUp(ev_SP_List_Uhde_Gemba_Walk_Main, ID = Gallery2.Selected.ID).[@Value]),
    Notify(Value & " is missed", NotificationType.Error)
    )
    );

  • mmbr1606 Profile Picture
    14,560 Super User 2025 Season 2 on at
    Re: Validating data from sharepoint columns in a loop

    can u try this instead:

    Set(varRecord, LookUp(ev_SP_List_Uhde_Gemba_Walk_Main, 'Identyfikator (ID)' = Gallery2.Selected.ID));
    
    
    ClearCollect(ColumnNames,
     "Answer 1", "Answer 2", "Answer 3", "Answer 4", "Answer 5",
     "Answer 6", "Answer 7", "Answer 8", "Answer 9", "Answer 10",
     "Answer 11", "Answer 12", "Answer 13", "Answer 14", "Answer 15",
     "Answer 16", "Answer 17", "Answer 18", "Answer 19", "Answer 20",
     "Answer 21", "Answer 22", "Answer 23", "Answer 24", "Answer 25"
    );
    
    
    ForAll(ColumnNames, 
     If(
     IsEmpty(varRecord[@ThisRecord.Value]),
     Notify(ThisRecord.Value & " is missing", NotificationType.Warning)
     )
    );
    

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • ShockWave21 Profile Picture
    on at
    Re: Validating data from sharepoint columns in a loop

    ShockWave21_0-1715945684455.png

     

  • ShockWave21 Profile Picture
    on at
    Re: Validating data from sharepoint columns in a loop

    ShockWave21_1-1715946276252.png

     

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 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard