kipkingle
Active Member
Request – Within a Find/Browse form, a user would like to be able to search all records in a custom table that have string field “OBNM” equal to “P01012” OR “P004A”. While this task would be easy to complete using an SQL statement, it seems fairly tricky to do in JDE.
Potential Solution 1 – Apply the hide/show method.
I could just create two fields on the form. Then I could use the filter on the first field, and apply the hide and show technique in the “Grid Record is Fetched” event for the second field. (Show the records that match the second field and hide the other records.) Although this method works, it’s just too slow due to the fact that my custom table has 1.7 million records.
Potential Solution 2 – Use the Set Selection Criteria in the “Post Dialog is Initialized Event” method
Although this method seems like it should work, I couldn’t get it to match my requirement. Actually, I couldn’t get my “Set Selection” statement to work at all. When I inserted the statement in the “Post Dialog is Initialized Event”, and ran the program, it would hide all of the values in the field that I was doing a set selection against. (Yes, I put the “Set Selection Append Flag equal to “yes” statement before it.) Plus, it wouldn’t even filter on the correct records. This issue may just be related to 8.9 though because I believe I used this method successfully in older versions. (FYI – this method did work when I used it in a mock report.)
Potential Solution 3 – Use the B9600430 business function to dynamically create the SQL statements.
This is a new method that I found on JDELIST that looked like it might help me complete my task. Unfortunately, I’ve never tried it before. I looked at the P96400A application and tried to decipher how this bf could be used. I found that if I called the “Init Selection”, “SetSelection”, “OpenTable”, and “Add Select” business functions in sequence, that it will create the proper SQL statements in the debug log. The only problem is that the application still calls the main SQL statement afterwards. So the last SQL statement wins, and the application does not display the correct information. I tried to disable the base form SQL by putting a “Stop Processing” event on the “Grid Record is Fetched” event, but that didn’t work either.
Does anyone know how to disable the SQL statements in a grid? Has anyone every successfully used the B9600430 method on an application?
Thanks,
Kip.
8.9 SP2
Potential Solution 1 – Apply the hide/show method.
I could just create two fields on the form. Then I could use the filter on the first field, and apply the hide and show technique in the “Grid Record is Fetched” event for the second field. (Show the records that match the second field and hide the other records.) Although this method works, it’s just too slow due to the fact that my custom table has 1.7 million records.
Potential Solution 2 – Use the Set Selection Criteria in the “Post Dialog is Initialized Event” method
Although this method seems like it should work, I couldn’t get it to match my requirement. Actually, I couldn’t get my “Set Selection” statement to work at all. When I inserted the statement in the “Post Dialog is Initialized Event”, and ran the program, it would hide all of the values in the field that I was doing a set selection against. (Yes, I put the “Set Selection Append Flag equal to “yes” statement before it.) Plus, it wouldn’t even filter on the correct records. This issue may just be related to 8.9 though because I believe I used this method successfully in older versions. (FYI – this method did work when I used it in a mock report.)
Potential Solution 3 – Use the B9600430 business function to dynamically create the SQL statements.
This is a new method that I found on JDELIST that looked like it might help me complete my task. Unfortunately, I’ve never tried it before. I looked at the P96400A application and tried to decipher how this bf could be used. I found that if I called the “Init Selection”, “SetSelection”, “OpenTable”, and “Add Select” business functions in sequence, that it will create the proper SQL statements in the debug log. The only problem is that the application still calls the main SQL statement afterwards. So the last SQL statement wins, and the application does not display the correct information. I tried to disable the base form SQL by putting a “Stop Processing” event on the “Grid Record is Fetched” event, but that didn’t work either.
Does anyone know how to disable the SQL statements in a grid? Has anyone every successfully used the B9600430 method on an application?
Thanks,
Kip.
8.9 SP2