Home » Developer & Programmer » Forms » How to skip some records after execute query
How to skip some records after execute query [message #213645] Thu, 11 January 2007 12:30 Go to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Hi,
We have a display field in multi-record block, which has been fetched dynamically depending on the data in the master block.
So, we have made that as non-databaseitem in the multi-record block.
Also we're using an id field in the multi-record block which is relevant to the above display field.

If we want to query on the display field, how to handle this situation?

I could think of two solutions.
1. Display all the records and loop through the multi-record block and check for the display field and use clear_record for the records, for which the condition has not matched. But we're wondering in which trigger we need to write the code.
2. We need to get the id values for the particular condition on the display field and append the condition on id field with an IN clause.

Tricky part here is user can query using '<something>%' on the display field. Hence we can't change the condition to id field. We need to use IN clause for this.

Please suggest the better solution or any other way to do this?

Thanks in adv,
Vamsi
Re: How to skip some records after execute query [message #214331 is a reply to message #213645] Mon, 15 January 2007 22:32 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you tried modifying the 'default_where' of the detail block before doing the 'execute_query'?

David
Re: How to skip some records after execute query [message #214362 is a reply to message #214331] Tue, 16 January 2007 00:44 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
David,
Thanks a lot for the reply.

We were trying to do that. But the problem is with dynamic generation of the value from id.
I forgot to tell that the value in the di played field from id is being generated dynamically using some conditions.

Also we have no idea about the column names also. The select statement we get dynamically may contain more than one column and also we have no idea which column we will pick to display.

That's why we have decided to do a CLEAR_RECORD after fetching all. But no idea in which trigger we can write this.

Thanks,
Vamsi.
Re: How to skip some records after execute query [message #214364 is a reply to message #214362] Tue, 16 January 2007 00:49 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Do you know which table will be searched in the detail block?

David
Re: How to skip some records after execute query [message #214366 is a reply to message #214364] Tue, 16 January 2007 00:58 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Yes.
But the table contains only the id column. To get the value column there will be a dynamic select.
We want to search on the value column, which is a non-database item of the detail block.

Edit: We have restricted the search to LOV and enabled the LOV in enter query mode. This is what we have found feasible for the time being and it is working.

Thanks,
Vamsi

[Updated on: Tue, 16 January 2007 03:25]

Report message to a moderator

Re: How to skip some records after execute query [message #214506 is a reply to message #214366] Tue, 16 January 2007 16:53 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Try the 'FROM clause query' see http://www.orafaq.com/forum/m/121429/67467/?srch=%22from+clause+query%22#msg_121429 and http://www.orafaq.com/forum/m/147550/67467/?srch=%22from+clause+query%22#msg_147550

David

Actually search for QUERY_DATA_SOURCE_NAME and look at attachment in http://www.orafaq.com/forum/t/53596/67467/

[Updated on: Tue, 16 January 2007 17:33]

Report message to a moderator

Previous Topic: How to run forms on Oracle 9i forms developer.. plzz help
Next Topic: pwd encryption
Goto Forum:
  


Current Time: Wed Dec 07 22:17:38 CST 2016

Total time taken to generate the page: 0.09930 seconds