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 / Auto add on scan to co...
Power Apps
Answered

Auto add on scan to collection

(0) ShareShare
ReportReport
Posted on by Super User 2024 Season 1

Hello everyone,

 

I would like to know is it possible after i scan and it matches the lookup then to auto add to the collection gallery and navigates to the relevant screen so i can add only quantity, here is my currant formula for the collection

 

Capturescdan.PNG

 

 

Collect(
 CartList,
 {CItemSerialNumber: Text(Last(CartList).CItemSerialNumber + 1),
 ID: Concatenate(
 Text(
 Now(),
 "[$-en-US]mm/dd/yyyy hh:mm:ss"
 ),
 ThisItem.Title,
 Text(TextInput1.Text)
 ),
 Name: ThisItem.Sales_x0020_Description,
 SKU: ThisItem.Title,
 Amount:TextInput1.Text,
 Price: TextInput1_2.Text,
 Total: (TextInput1.Text * TextInput1_2.Text)
 }
));Navigate('Book Listing_Orders_1',ScreenTransition.Cover)

 

 

 

 

Thank you

 

 

Categories:
I have the same question (0)
  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hi @Ramole

    there is a control named "OnScan" in your "scan" button (if you use the barcodescanner). Just add an "if"-statement around your code, than this should work.

    Like:

    if(Self.Value exactin <YourLookupCollection.ColumnName>,
    Collect(
     CartList,
     {CItemSerialNumber: Text(Last(CartList).CItemSerialNumber + 1),
     ID: Concatenate(
     Text(
     Now(),
     "[$-en-US]mm/dd/yyyy hh:mm:ss"
     ),
     ThisItem.Title,
     Text(TextInput1.Text)
     ),
     Name: ThisItem.Sales_x0020_Description,
     SKU: ThisItem.Title,
     Amount:TextInput1.Text,
     Price: TextInput1_2.Text,
     Total: (TextInput1.Text * TextInput1_2.Text)
     }
    ));Navigate('Book Listing_Orders_1',ScreenTransition.Cover),
    Notify("Not data / lookup value found"))

     

    Hope this helps you!

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @MarvinBangert 

     

    I am having hard time the lookup to navigate with the collection and add to the gallery, my lookup looks a CODE field but it navigates blank when i try, can you please tell me the correct formula for the lookup

     

    Thanks

     

     

     

  • Verified answer
    Ramole Profile Picture
    Super User 2024 Season 1 on at

    I have re used my own formula just added a Global variable and used across screen 

    Collect(
     CartList,
     {CItemSerialNumber: Text(Last(CartList).CItemSerialNumber + 1),
     ID: Concatenate(
     Text(
     Now(),
     "[$-en-US]mm/dd/yyyy hh:mm:ss"
     ),
     ThisItem.Title,
     Text(TextInput1.Text)
     ),
     Name: ThisItem.Sales_x0020_Description,
     SKU: ThisItem.Title,
     Amount:TextInput1.Text,
     Price: TextInput1_2.Text,
     Total: (TextInput1.Text * TextInput1_2.Text)
     }
    ));Navigate('Book Listing_Orders_1',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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard