how to check if values in text box match data source

  • how to check if values in text box match data source

    Posted by DSC Communities on August 28, 2019 at 12:20 pm
    • Kelli Wolf

      Member

      August 28, 2019 at 12:20 PM

      Hi, I’m very new to PowerApps! I’m currently trying to make a log in page of sorts. On my Excel doc, I have a table with two columns- Name and Employee ID. On the log in page, I have a dropdown list so the user can find their name and then a text input so they can type in their Employee ID. I want a button that will be able to check that those two values matchĀ (and eventually go to the next screen) what is on the Excel table. I’m not sure which function (Match, LookUp, etc) would be the best to make this work.

      ——————————
      K. Wolf
      ——————————

    • Brian Scott

      Member

      August 28, 2019 at 1:37 PM

      Not sure if this will work for your application, but it may be easier for the user if you just check the User against the list of people who are allow to use the app. Just addĀ 
      Set(var_User, User())
      to the OnStart of the app, then you can check that against the list of people who can use the app. Of course, you can also limit the people who have access by who you Share the app with.
      If I misunderstood what you’re trying to do, let me know.

      ——————————
      Brian Scott
      Chief Creative Officer
      Concord NC
      ——————————
      ——————————————-

    • Kelli Wolf

      Member

      August 28, 2019 at 2:03 PM

      Thanks for the response! Unfortunately it’s an app for a set of technicians who don’t necessarily log into any system, they just have a general login and go from there. But I want to be able to track who is using the app and what they’re doing on it, hence the log in screen.

      So far I have this (which doesn’t work):
      NextArrow(If(LookUp(Table2,ID = id_input && Name = name_dropdown), true, Notify(“Incorrect ID”)))

      ——————————
      Kelli Wolf

      ——————————
      ——————————————-

    • Rachel Albrecht

      Member

      August 29, 2019 at 3:28 AM

      Hi Kelli

      Try:

      If(id_input.Text <> (LookUp(Table1, Name = name_dropdown.Selected.Name, Text(‘Employee ID’))), Notify(“Incorrect ID”))

      I’ve dummied up a table and put this on the OnSelect of a button (which I am assuming you are doing the same?)

      See how that goes for you!

      Rach šŸ™‚

      ——————————
      Rachel Harris
      Business Applications Specialist
      configatek
      info@configatek.com
      ——————————
      ——————————————-

    • Vishal Mistry

      Member

      August 29, 2019 at 9:08 AM

      Hi Kelli,

      Use Lookup, Navigate & If combination

      Lookup from your data source based on the Name and Employee ID, and if it does not return blank then navigate to the next screen else do nothing

      If(!IsBlank(LookUp(<DataSource>, DropDown.Selected.Value = Name && TextBox.Text = EmployeeID, Name)),
      Navigate(<NextScreen>, Transition.Fade)
      )

      ——————————
      Kind regards,

      Vishal Mistry
      ——————————
      ——————————————-

    • Kelli Wolf

      Member

      August 29, 2019 at 11:08 AM

      Thank you both! Vishal’s code had the least amount of errors when I put it so I stuck with that one. I had to changeĀ DropDown.Selected.Value toĀ DropDown.Selected.Result but it works! Thanks again!!

      ——————————

      ——————————
      ——————————————-

    DSC Communities replied 6 years, 7 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘how to check if values in text box match data source’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!