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 / Get Nth item if exists
Power Apps
Unanswered

Get Nth item if exists

(0) ShareShare
ReportReport
Posted on by

Hello, 

I have a sharepoint list with N item. I want to get the Nth item but only if exists, otherwise i should get a blank or some sort of error.

It's a list of questions related to a game. Each game might have 10 questions but it might happen that some are not set, so i have to check for that.

 

Last(FirstN(Filter(mySPlist, chosedID=ID),2)));

I used this function but in this case, if the list have only one item, instead of giving me "blank" it gives me the first and only element of the list...

how can i achieve what I need?

Categories:
I have the same question (0)
  • Ash13 Profile Picture
    576 on at

    Are you looking for LookUp?

     

    LookUp(mySPlist, chosedID=ID)
  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @Antonioclk 

    You could consider calling the Index function. This will return an error if the Nth item doesn't exist.

    Index(FirstN(Filter(mySPlist, chosedID=ID),2)),2);

    You could wrap this around a call to IfError to return a blank rather than an error.

    IfError(
     Index(FirstN(Filter(mySPlist, chosedID=ID),2)),2),
     Blank()
    );
  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @Antonioclk - can you confirm whether the formula above solved your problem?

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

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard