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

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Automatically adding comma after each input

(0) ShareShare
ReportReport
Posted on by 106
Hi! I'm building an inventory request form using Power Apps (following Andrew Hess's brilliant repeating table tutorial). SharePoint stores the repeating table data as HTML. Now, I would like to use portable scanner to enter inventory code into textinput field. My goal is to automatically add comma after user scan each code. 
 
 
 
which means:
First line: if quantity is 1, no need to add comma, i.e. A00001
Second line: if quantity is larger than 1, after user scan the first code add comma (i.e. A00002, ), until the last code do not add comma   
 
Your advise is greatly appreciated. 
I have the same question (0)
  • mmbr1606 Profile Picture
    14,503 Super User 2025 Season 2 on at
    Automatically adding comma after each input
    hey
     
    can you show us more on your patchcode? or are you doing SubmitForm()?
     
     
    cheers
  • Suggested answer
    SebS Profile Picture
    4,485 Moderator on at
    Automatically adding comma after each input
    It's depend how You scanning if it's mobile scanner or normal Scanner what emulate Keyboard 

    but You need something like this 

    in the OnChange property of Input:
     
    If(
        !IsBlank(Self.Value) &&
        CountRows(colScannedCodes) < Value(txtQty.Value),
       
        // ✅ GOOD SCAN
        Collect(colScannedCodes, { Code: Self.Value });
        Set(varScanWarning, false);
        Reset(Self),
     
        // ⚠️ TOO MANY SCANS
        Set(varScanWarning, true);
        Reset(Self)
    )
    Than You can have a lable showing all scans 

     
    Concat(colScannedCodes, Code, ", ")

    and at the end you create a patch what will handle input to datasource
        Patch(
        'Inventory Lines',
        Defaults('Inventory Lines'),
        {
            Quantity: Value(txtQty.Value),
            Codes: Concat(colScannedCodes, Code, ", ")
        }
    );
     
    After patch you need to clear collection
    Clear(colScannedCodes);

    The Warning is handled by lable with text and visible property set to variable


     

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

Coming soon: forum hierarchy changes

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

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 740 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 340 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 248 Super User 2025 Season 2

Last 30 days Overall leaderboard