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 / Transition upon qr scan
Power Apps
Unanswered

Transition upon qr scan

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello i have a qr scanner that scans different value. I want to be able to make a navigation to a next screen upon scan based on the value it scans. 
So if the value its 5 then navigate to screen 5 or if value its 3 navigate to screen 3 

Any idea ?

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi @Anonymous!

     

    I would create a hidden TextInput control, then have its default value set to

    BarcodeScanner1.Value

     

    Then I would have the OnChange property set to:

    If(
     BarcodeScanner1.Value = 1,
     Navigate(ScreenName1, transition.none),
    
     BarcodeScanner1.Value = 2,
     Navigate(ScreenName2, transition.none),
    
     BarcodeScanner1.Value = 3,
     Navigate(ScreenName3, transition.none)
    )
    
     

     

    Initially make the TextInput visible so that you can confirm the QR codes are returning the correct values,

     

    Could you give that a try and let me know if that's helped?

     

    Thanks!

    Sancho

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It just displayes the value from the qr scanner, but do not navigates. Did paste in the code that u mentioned also

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    my default value its this First(Match(scanValue;"JOBB:(.+)LAGERSTED:";MatchOptions.Contains).SubMatches).Value

    Because i have to split the qr value, but it gives me the value 5 so thats correct, but failes on navigation

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The wrong code its in the navigation. It do not navigate at all. even tho i use same code as u specified. Have also tried  to type 5 direclty in the input, but With no luck

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi,

     

    You said if the value equalled, so I used code for a numeric value, if you are using the split text then change your numbers from 1 to "1" to make it equate against the text values.

     

    Additionally, I can see your editor is using ; instead of a comma ,

     

    Please try the following:

    If(
     Self.Text = "1";
     Navigate(ScreenName1; transition.none);
    
     Self.Text = "2";
     Navigate(ScreenName2; transition.none);
    
     Self.Text = "3";
     Navigate(ScreenName3; transition.none)
    )

     

    Thanks,

    Sancho

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    alrdy done this. 

    My default : First(Match(scanValue;"JOBB:(.+)LAGERSTED:";MatchOptions.Contains).SubMatches).Value

    My onchange : If(TextInput2.Text = "5"; Navigate([@SKIFT]; ScreenTransition.None); TextInput2.Text = "5"; Navigate(REP; Transition.None))

    TextInput2 are the textinput Field itself. I have tried With the barcodescanner1 aswell but nothing. I did read something about this being a bug from Windows side 

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Thanks, Yes, was able to confirm that OnChange from another source doesnt trigger it, only if you input the text.

     

    A workaround would be to use a timer, set to 50ms repeat autostart, and have its OnTimerEnd have that code that was on the Onchange of the TextInput:

     

    autonav.gif

     

    The buttons shown are only setting the value to 4 or 5, which is then picked up by the timer

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    uhm how would this work? Because the time will prby run out of time before i take the qr picture tho

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    tried with auto and repeat but still no luck. 

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    With Repeat and AutoStart on, it will run continuously, then you just need to make it invisible and users will be none the wiser

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 305 Most Valuable Professional

#2
11manish Profile Picture

11manish 212

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard