What is the best way to achive: I have a form with around 10(country, ssn,

Certified Senior Developer
What is the best way to achive:
I have a form with around 10(country, ssn, fname, lname, age, etc) search criteria fields. User is required to mandatorily enter only one field. Rest 9 are optional.
In this case, what would be the best implementation way?? I need to fetch the records from the DB(2 different tables) for the entered criteria. If I use Query Database, how my SQL looks like since the where clause is dependent on the user input.
Any guideline / document would be of great help.
TIA....

OriginalPostID-63845

OriginalPostID-63845

  Discussion posts and replies are publicly visible

Parents
  • Appologies, on your first point, a decision "length(trim(filternulls({pv!one,..., pv!ten}))) > 1" should do the trick- or and(isnull(pv!one), ... isnull(pv!ten)) or something.
    On your second point, if you can't use query rules to do exactly what you need you could create a view in the DB (restrict your tables to the required columns) and use a query db node to do a direct SQL query. This would give you much more latitude.
Reply
  • Appologies, on your first point, a decision "length(trim(filternulls({pv!one,..., pv!ten}))) > 1" should do the trick- or and(isnull(pv!one), ... isnull(pv!ten)) or something.
    On your second point, if you can't use query rules to do exactly what you need you could create a view in the DB (restrict your tables to the required columns) and use a query db node to do a direct SQL query. This would give you much more latitude.
Children
No Data