Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Index Function

Posted on by 372

Hi,

 

I got 'ghost' error😭

 

I have patch function, I want to get my second largest data. I used this:

 

'Next Location': Index(Sort(
   Filter(
      AllRecapSOW, 
      'No. PO' = SOPOWBS_5.Text
        ), 'No Sec SOW', SortOrder.Ascending),
          2
).Area

 

Everything works well, but I dont know suddenly I got error "The 'Index' function cannot be called with an empty table."

 

Can anyone help me? Thankyou!

  • firda59 Profile Picture
    firda59 372 on at
    Re: Index Function

    @gcmfaizan how to do it? I never do that before

  • gcmfaizan Profile Picture
    gcmfaizan 1,024 on at
    Re: Index Function

    @firda59  can you Verify the actual threshold configured in your SharePoint/powerapps? If it's lower than the default 5000. The threshold is set at 5000 items by default, but it can be lower based on the configuration and performance of your SharePoint/powerapps.

  • firda59 Profile Picture
    firda59 372 on at
    Re: Index Function

    @gcmfaizan 

     

    I try that formula, and I got "No second largest data". I think its because the SharePoint list has more than 2000rows. Do you know how to read data SharePoint list more than 2000?

  • gcmfaizan Profile Picture
    gcmfaizan 1,024 on at
    Re: Index Function

    Hi @firda59 ,

     

    can you try this formula with CountRows function it's help you to encounter this error, your new formula may looks like this:

    If(
     CountRows(
     Filter(
     AllRecapSOW, 
     'No. PO' = SOPOWBS_5.Text
     )
     ) > 1,
     Index(
     Sort(
     Filter(
     AllRecapSOW, 
     'No. PO' = SOPOWBS_5.Text
     ), 
     'No Sec SOW', 
     SortOrder.Ascending
     ),
     2
     ).Area,
     "No second largest data"
    )

     

    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

     

    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

November 2024 Newsletterā€¦

November 2024 Community Newsletterā€¦

Community Update Oct 28ā€¦

Power Platform Community Updateā€¦

Tuesday Tip #7 Community Profile Tipsā€¦

Welcome to a brand new series, Tuesday Tipsā€¦

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard