web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard