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 / LookUp or ClearCollect?
Power Apps
Answered

LookUp or ClearCollect?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Powerapps Community!

 

Back at it with more questions 🙂

 

I am currently creating an app, where it has the ability to check in/ check out an asset.

(Think of it like a library book)

The process if as follows: Scan QR Code, Powerapps Reads code, User clicks 'Check Out', and this information is recorded in a SharePoint list.

 

To Check in an item, user would click on 'Check in' through powerapps, a gallery would then display the items, and the user could select which item they wish to check in.

 

I would like to make it a little fancier at the Check Out process, where Powerapps could match the QR code against one recorded against SharePoint, and see whether the status in the CheckedOut column is 'Yes'/'No'.

 

My current formular is this for 'On Select' of the Check Out button:

ClearCollect(DatabaseName,Distinct(Filter(DatabaseName, Value(ItemCode)=TextInput1 && CheckedOut="YES"))

 

I'm a little lost as to where to go next.

Ideally I would like a message to appear saying "This item has already been checked out by xx"

And if there is no match, the button would navigate to a window indicating success.

 

Would it be better if I used 'LookUp' instead of 'ClearCollect'?

 

Hope this isn't too confusing

 

Thanks in advance!

Categories:
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have answered my own question!

     

    The formula is the one I used below:

    Set(varItem,LookUp(DatabaseName,Title=TextInput1.Text&&CheckedOut="YES"));If(IsBlank(varItem),Navigate(Checkout,ScreenTransition.Cover);NewForm(CheckoutForm),Navigate(CheckedMsg,ScreenTransition.Cover))

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard