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 / Default value if looku...
Power Apps
Answered

Default value if lookup doesn't find any record

(0) ShareShare
ReportReport
Posted on by 59

Hi all,

I am trying to store value of  Level1 column of data source CustGrp  to a collection varGroup where customerNo equals 1234. 

I need to pass another field (say Level2) if below lookup fails to match any record in CustGrp data source.

 

Collect(varGroup,LookUp(CustGrp,CustomerNo = '1234',Level1));

 

is this possible?

 

Thanks,

Categories:
I have the same question (0)
  • Verified answer
    PVosEska Profile Picture
    329 on at

    Hi @aarnav , how is this?

     

    With the With() Function, you can create a temporary variable just during the execution of the formula. If you put the LookUp() in this with, you can check the result afterwards and handle it.

     

    Example:

    With(
     {
     tempvar: LookUp(
     CustGrp, 
     customerNo = 1234,
     Level1
     )
     },
     If(
     !IsBlank(tempvar),
     <Collect here>,
     IsBlank(tempvar),
     <other collect here>
     )
    )

     

    Good luck!

  • Verified answer
    zmorek Profile Picture
    3,272 on at

    With(LookUp(CustGrp,CustomerNo=1234), Collect(varGroup,Coalesce(Level1, Level2)))

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 339 Most Valuable Professional

#2
11manish Profile Picture

11manish 180

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard