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 Apps
Unanswered

Index Warning

(0) ShareShare
ReportReport
Posted on by 2
Hi,
 
I am getting Index Warning in powerapps form, where I have used collection to retrieve the value using Index function .
 
Index(CollectItems,1).Title 
 
And I cleared the collection after the submission, again I replaced the value with the last record submitted. I checked the collection which is not empty. But still I am getting this Index Warning attached.
 
 
 
Categories:
I have the same question (0)
  • Infamous_Let Profile Picture
    330 on at

    One way to avoid this is by checking if the collection has any data before using the Index function. You can do something like If(CountRows(CollectItems) > 0, Index(CollectItems,1).Title, "No Data Available") to make sure it's not empty when accessed.

    Alternatively, using First(CollectItems).Title or Last(CollectItems).Title might work better depending on what you're trying to retrieve.

    Also, if you're clearing the collection and refilling it right after submission, there might be a slight timing issue. Try adding a delay or ensuring the new record is properly inserted before accessing it again.

  • SK-12020821-0 Profile Picture
    2 on at
    I tried using timer , still I am getting index warning once after submit.

     

    I used the below code, 

    Timer Properties I used:
    Timer1.Duration = 5000; 
    Timer1.AutoStart = false; 
    Timer1.OnTimerEnd = Clear(Collection);
    
    // Patch function to update or create records
    After Patch,I Set Timer1.Start() and removed Clear(Collection)

     Timer Properties I used:
    Timer1.Duration = 5000;
    Timer1.AutoStart = false;
    Timer1.OnTimerEnd = Clear(Collection);

    UpdateContext({StartTimer: false});

     

    Patch, I set 

    Timer2.Start = StartTimer;

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard