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 / Patch data to sharepoi...
Power Apps
Answered

Patch data to sharepoint when barcode scanned

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

I am trying to develop app, when operator start to do an order, he will choose his name,product type and process then scan and the 1st scan of that particular orderno will patch data into sharepoint the order no, product, process, start date/time.

when the job is finished for that orderno, the operator again scan the same barcode and this time it will lookup the same orderno,product,process and patch the finish time for the order.

 

an unique order no ex: SR001 can have only one product choice= mirrors, but it have 3 process= cutting,drilling ,assembly.

 

so each orderno will have stable product but process & operator will vary. but stuck here what kind of program to write here to make it work.

 

Capture.JPG

 

Capture1.JPG

 

I am stuck here on how to proceed with formulas on on scan property. any help with powerapps program is highly appreciated.

 

 

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi All,

     

    At the moment i used below code as the on scan property,

     

    for the 1st time scan of an order no, it will simply patch the orderno, operator,product, process & start time. but for the 2nd time scan of same order no with same operator,product & process it should update the finish time.

     

    then, the order move to different process, so same orderno, same product, but different operator & process, so the 1st time scan on different process need to be done as new registry in sharepoint list. & 2nd time scan will update its finish time.

     

    In general the order no & product remains the same, since we have 3 process, we have 3 operator. and each process start & finish time is required to get collected. 

     

    but i am stuck here na dneed help this below formula is only making the 1st registry , when i change the process its not making any new registry.

     

    any help is highly appreciated

    If(
     IsBlank(LookUp('Aluminium Output',Orderno=BarcodeScanner1.Value,Start)),
     Patch(
     'Aluminium Output',
     LookUp('Aluminium Output',Orderno =BarcodeScanner1.Value),
     {
     Start:Now(),
     Operator:Operator.SelectedText.Value,
     Product:Product.SelectedText.Value,
     Process:Process.SelectedText.Value
     }
     ),
     Patch(
     'Aluminium Output',
     LookUp('Aluminium Output',Orderno=BarcodeScanner1.Value),
     {
     Finish:Now()
     }
     )
    )

     

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Do you need the following features:

    • When the order number, operator and process of the current order do not exist in'Aluminium Output', add a new record.
    • When the order number, poerator and  process of the current order match a record in'Aluminium Output', the Finish field of the record will be updated to Now().

    Note: The syntax of adding a new record is different from that of modifying the record.here

    If this is the case, your code only needs to be modified slightly(The red part is where I modified):

    If(
        IsBlank(LookUp('Aluminium Output',Orderno=BarcodeScanner1.Value && Operator=Operator.SelectedText.Value && Process=Process.SelectedText.Value)),
        Patch(
            'Aluminium Output',
            Defaults('Aluminium Output'),
            {
                Start:Now(),
                Operator:Operator.SelectedText.Value,
                Product:Product.SelectedText.Value,
                Process:Process.SelectedText.Value
            }
        ),
        Patch(
            'Aluminium Output',
            LookUp('Aluminium Output',Orderno=BarcodeScanner1.Value && Operator=Operator.SelectedText.Value && Process=Process.SelectedText.Value),
            {
                Finish:Now()
            }
        )
    )

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-bofeng-msft ,

     

    Thanks for help.

     

    I used the new formula but its throwing me an error.

     

    9.JPG10.JPG

     

    11.JPG

     

    any help is highly appreciated.

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    It may be that the control name and the field name are the same, resulting in ambiguity. I suggest you change the control name to something else.

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-bofeng-msft ,

     

    Thanks for help.

     

    it works now after i change the name.

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard