I need to return values based on what is written on a text field

28 Views Asked by At

Ok, I have to build a page where the user inputs the registration number of the employee, and then after clicking on a button, it should pop a table with the roles in which this person has access. How can I configure a text field in a way that selects something in the database and then returns this informaton into a table?

I tried using a dynamic action but I actually didn't have any result

1

There are 1 best solutions below

0
Littlefoot On

This is how I understood it:

  • create a page item, let's call it P1_REGNUM

    • if you don't want users to type that value manually, set it to e.g. select list (or popup) item, write a List of Values query that returns list of valid values
    • also, set that item to submit the page (so that you wouldn't even need a button)
      • if you want to have a button, OK - have it; let it submit the page as well
  • create report region (pick between classic and interactive report)

  • use P1_REGNUM in its where clause, e.g.

    select regnum, first_name, last_name, date_of_birth
    from employees
    where regnum = :P1_REGNUM
    
  • put P1_REGNUM into items to submit region property

  • that's it; run the page, enter (or select) registration number and report will fetch data related to value that is in P1_REGNUM item