Jump to content
  • 0

How to search on lookup table value in a tabular report



I have a tabular report containing afield that has a lookup table associated with it (1 to many relationship).  How do I do a search in the table for rows that have a value that is contained in a lookup table.  E.g.I have lookup table of Department ID & Department name.  In my tabular report of employees with Employee ID, Employee Name, Department ID (each employee belongs to a particular department) I want to search for Employees belonging to a department, using the department name rather than Department ID.  And I want the search to be able to use "Contains" e.g. bring up all Employees with "Admin" in the Department name, as there are a number of Departments with "Admin" as part of their name.  e.g. Postal Admin, Finance Admin. Apologies if it's a rookie question !

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I'm not exactly sure at the moment what you would need to do for a Text Field... but if you use a Dropdown Element for this, it is easy.  In your DataPage Wizard, go to the Configure Search Fields page. Select the field you want to search by (in your case, Department). Change the field to Dropdown, and change Source to either Both or Lookup Table or View. I like to use both because I put an empty option in the Custom Values section to allow the user to search 'all'. 

On the Lookup Table tab, select the department table. Change Field For Display to Department Name and change Field For Value to Department ID. This will show the Departments to the users as the Department Name, but Caspio will take in the value of the ID. 


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...