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 / how to pass the value ...
Power Apps
Answered

how to pass the value to multiple text input controls after running codes ?

(0) ShareShare
ReportReport
Posted on by 74

hi All

          I have one EditFom with BarocdeScanner (button) and some text input , when I scanned E-Invoice QR code , I need split scannedString to different strings and pass to different Text input  in the same form, now my issue are :

         1. my BarcodeScanner can scan the QR code and pass the scannedString to one of the text input (named: txtScannedString).

         2. if I used Split function to do that, how to access the values after splited and pass these information to other text input ?

 

         I tried to use onChange property to do it, but not successful.

 

       can someone give me a direction ?

  

       thanks in advance!

Categories:
  • anabananei Profile Picture
    195 on at

    Hi @wht_629 ,

     

    Can you share more about your problem? A screenshot would be helpful.

     

    Do you need the scanned string in the txtScannedString.text to be split further into different text input? Example

     

    txtScannedString: AOOO1-12345-67890

    Split String 1: AOOO1

    Split String 2: 12345

    Split String 3: 67890

     

    If so, the RIGHT, LEFT, and MID function can solve your problem. Set the default of the SplitTextInput depending on the "split" you will apply on txtScannedString.text

     

    Let me know if this helps.

     

    Thanks!

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

    Hi @wht_629 ,

     

    Try to Set the OnScan property of BarcodeScanner as follows.

    ClearCollect(SplitScan,Split(BarcodeScanner1.Value,"-")) // Assume that the separator is a dash

    Set the Default property of the first text input:

    Last(FirstN(SplitScan,1)).Result

    Set the Default property of the second text input:

     

    Last(FirstN(SplitScan,2)).Result

    Set the Default property of the third text input:

    Last(FirstN(SplitScan,3)).Result​

    When the QR code is scanned, the scanned text is split and generated into each text input box.

    Hope this helps.

    Sik

     

     

  • wht_629 Profile Picture
    74 on at

     hi 

         I attached my mobile screen, I pressed button "Scan" to begin to scan the QR code, then pass the scanned value to scannedString text input.

        once scannedString has the new value, I wanted the code to split the scannedString to other text input ( I set up their display mode to view )  .

     

        as I am new to power Apps , so don't know how to access splitted values and control the logic to assign the value to other

        text inputs.

    EditForm.JPG
  • anabananei Profile Picture
    195 on at

    Hi @wht_629 ,

     

    Can you elaborate further how exactly you want to split the text? And how many text inputs do you have? And what should be their value from the scannedString?

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @wht_629 ,

     

    Have you tried my workaround?

     

    You just need to save the split values into a collection, and configure the Default property of these Text Input box based on the row of split values collection.

     

    Sik

  • Verified answer
    wht_629 Profile Picture
    74 on at

    @v-siky-msft 

            I tried your code in my app , it's works fine, thanks!      

  • Josu507Trance Profile Picture
    3 on at

    Thank You so much ! 😁

  • AVTS Profile Picture
    538 on at

    Team what formula should i apply if there is no sperator like -

    txtScannedString: AOOO11234567890

    Split String 1: AOOO1

    Split String 2: 12345

    Split String 3: 67890

     

    I want to achieve the above . I am having challange here since i do not see seperator in this.

  • Anandhavalli Profile Picture
    34 on at

    Hi  v-siky-msft...
           Could you help me with the correct code? I used the code which you suggested but it's showing an error.

    Screenshot (818).png

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard