• Post Reply Bookmark Topic Watch Topic
  • New Topic

Populating input fields back from a search query

 
Swathi Ram
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a search screen that can take multiple values as inputs, for which i'm building a query dynamically. These queries get dave in the database as a String. Now when I pull this string out of the DB, I need the fields in the search screen to be populated with the values in the where clause.

Has anyone done anything like this? Right now I am going thru the query string trying to make substrings, but that in highly trivial and tedious as the query is huge. I'm looking for a different way to do this. Any input is welcome.

Thanks in advance.

Swathi
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Swathi Ram:
These queries get dave in the database as a String.


I assume that "dave" means "saved"? (Please proofread your posts carefully before comitting).

Why? Doe something else need them to be in that format? if not, store them ina format more suitable to their use.
 
Swathi Ram
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, saving the whole query in the DB is the only option that i have. Hence I have to pull the values back only from that.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm guessing this is like a saved custom report and you want to reproduce the screen the user entered when making it.

Can you save the original SQL plus something else? Maybe terminate the sql and add some name=value pairs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!