You are viewing limited content. For full access, please sign in.

Question

Question

In Forms, can you have a "where statement" on a table lookup?

asked on October 14, 2019

I have a database that has contracts and a status "Active", "Expired" or "Archived" but I don't want the lookup to populate any contracts with status "Archived." Is it possible to only pull data which has status Active or Expired from the table, or am I stuck retrieving all data? 

0 0

Answer

SELECTED ANSWER
replied on October 14, 2019

You have to create a view or a stored proc in the database that returns the data you want

0 0
replied on October 14, 2019

Ah thanks, I wasn't even thinking about views. Perfect

0 0

Replies

You are not allowed to reply in this post.
replied on October 14, 2019 Show version history

Scott is correct. Using a pure table lookup in Forms to lookup a database table, you're stuck pulling all data from that table. However, you can create a more granular 'View' in the database, or a 'Stored Procedure' in the database, then you can create the lookup rule in Forms to lookup that View or Stored Procedure (Forms is not limited to only table lookups; lookups can be performed against Tables, Views, or Stored Procedures).

 

There is no native way within Forms to limit that lookup data, you must limit the data first in the database, then pass that limited view to Forms.

You are not allowed to follow up in this post.

Sign in to reply to this post.