Help with scanning a barcode serial and transferring the scanned serial to another lookup field in Zoho Creator

Help with scanning a barcode serial and transferring the scanned serial to another lookup field in Zoho Creator

I have two fields, same form: a barcode field and a lookup field. I want to scan a serial with the barcode field, and then put the serial in the lookup field, but I keep getting an error. The barcode field is a string field apparently and the lookup field is a bigint which might be the problem.

Can you help me fix my code to solve this please? I've gone over the documents and still can't figure it out. Thanks.

My code below:

Scan = row.Scan; // scan field
NewScan = Scan.remove("-"); // removing dashes from scan field wfter scan
row.Scan = NewScan; // putting the serial back into the scan field after removing the dashes
row.Device_Serial = Scan; // putting the scanned serial into another serial field, but it is not working because this field is a lookup field

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now