search using drop down list [message #575763] |
Sun, 27 January 2013 04:38 |
|
furqan
Messages: 115 Registered: January 2012 Location: Hyderabad
|
Senior Member |
|
|
Dear sir,
i have a tabular form based on table namely mm_dtl.
in that form i created two text_item.one is drop down list
with values such as sbno,desc,pno,desc1,pno1(columns names),and
another text_item is just unbound one.
when i select sbno in first text_item from list and enter sbno in second
text_item..then all the record with sbno entered in second text_item shud
get display in tabular form.same like this for other values of the list.
please guide.
Thanks.
|
|
|
|
Re: search using drop down list [message #575790 is a reply to message #575779] |
Sun, 27 January 2013 22:38 |
|
furqan
Messages: 115 Registered: January 2012 Location: Hyderabad
|
Senior Member |
|
|
thanks for your reply sir..
as i said text_item1 is a drop down with values sbno,desc1.
in the text_item1 user will select sbno and in text_item2 value of sbno for eg.1234
so all the records with sbno-1234 should get display.
same if the user select desc1 in text_item1 and enter the value of desc1 in text_item2 for eg. v_belt
all the records with v_belt as desc1 shud get displayed.
thanks.
[Updated on: Sun, 27 January 2013 22:40] Report message to a moderator
|
|
|
Re: search using drop down list [message #575799 is a reply to message #575790] |
Mon, 28 January 2013 00:59 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
One option is to set data block's DEFAULT_WHERE (or ONETIME_WHERE) property using SET_BLOCK_PROPERTY built-in. You'd use both text items to do that, as it appears that conditions - both left & right side - are subject to change. The whole thing can be rather complex, depending on data types (for example, character columns require single quotes, date values need to have correct format mask, etc.).
Therefore, create another (rather long) text item and put the result of your WHERE clause in there so that you'd see it properly and visually check whether it is correctly written or not. Because, if it is no, query won't return anything but an error message.
|
|
|
|
|
|
|
|
Re: search using drop down list [message #575846 is a reply to message #575844] |
Mon, 28 January 2013 06:35 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Why don't you read what I say and do what you were told?
Me, some time ago
The whole thing can be rather complex, depending on data types (for example, character columns require single quotes, date values need to have correct format mask, etc.).
Therefore, create another (rather long) text item and put the result of your WHERE clause in there so that you'd see it properly and visually check whether it is correctly written or not. Because, if it is no, query won't return anything but an error message.
So concatenate single quotes with that string! I told you that different datatypes behave differently, didn't I?
|
|
|