Non BV Field Searches

binky

Active Member
Hi all,

I am trying to determine if it is possible to change the data selection on a form the same way you can with a report.

What I have done is added new fields to P4210. They are for a new table I have created to track adittional information that I can't in F4211. I would like to be able to use them as search criteria but I can't seem to be able to. I can't modify the BV because of its type and I can't seem to find anywhere that I can set the FC variable to multiple values.

Any thoughts???
 
Hi Ken,

There are several way to filter on a form. Now just briefly, because local time is 9:30 PM.

a.) Use QBE fields. You can assign value(s) to this fields from ER.
b.) Use filter fields on the header part. You can place more filter fields based on the same BSVW field.
c.) Use the SetUserSelection and. etc. system function calls. See the explanation of them in the On-Line help - how to access this help - see on the Tips and Traps board of this Forum.
d.) Code your selection logic in ER in the GridRecordIsFetched and use the SuppressGridLine system function call to omit undesired records.

Hope, helped a bit.

Regards,

Zoltán
 
Thanks Zoltan!

I will look into these possibilites.

In regards to the QBE line, is it possible to have a QBE for a field that isn't in the BV? I haven't been able to figure out how to display one if there is a way.

I found the SetSelection function but it unfortunately won't let me use multiple values. What will probably happen is that I will lookup in my tag file the list of SO #'s that I want to display then somehow use that list to set the selection criteria.

Any more ideas??
 
Hi Ken,

Bad news.
My previously suggested "a", "b" and "c" solutions are working only for BSVW fields. Why don't you add these fields to the BSVW.

You can use SetSelection for multiple values, issuing them one time for all values and using OR realition between them (also works only for BSVW fields).

Maybe the solution is the "d" suggestion. Fetch for the required fields/values in the GridRecordFetched event enter your comparison as IF statement(s) and issue a SuppressGridLine sys func call when you want to omit the current record.

I have to tell, that this is the most time and performance consumming of the suggested four method, mostly on large number of record with few selections.

Regards,

Zoltán
 
Ken,

If you want to "fake" a filter, you can add a form control from the data dictionary, fetch your tag table (in grid row is fetched), compare to the form control, and suppress any unwanted rows.

However, your posts almost makes it seem that you want multiple filter values to compare against. Is this the case?

Gene
 
Yes I am aiming to have multiple search fields.

The other part of this to consider is that there will be in the tens of thousands of records to suppress.

Thanks
 
Unfortunately the BV is a Union join type. I can't add the fields that I need. Although... is it possible to create two business view that link my tag file and each of the original BV tables, then create another new BV linking these BV's with a Union join type??

If not...
It looks like I am going to do a SELECT using the search criteria from my three DD fields then a FETCH NEXT in a While loop using the SetSelection function with, as you suggested, the Or option.

Any ideas if I will have a problem leaving the last SetSelection with an Or?

Thanks
 
Ken,

Would you tell us why do you reject to add the fields to the BSVW?


Further, if you describe your problem a bit detailed and concrete, maybe the List will be able to help more effectivly.


Regards,


Zoltán
 
Ken,

You can not use the SetSelection method if you can not include your tag field into your BSVW. You can use the SuppressGridLine method only as I described previously.

Maybe I have an other solution for you.

1.) Create new table which inludes all required fields from the base and original table, but only for (one base-tag combination of union).
2.) Create a full BSVW on the previous table and use this on your form.
3.) Create a VIEW in SQL with the same name and fields as the mentioned custom table, which VIEW containes the tag files and creates the union and replace the table with this SQL VIEW.

I am not sure that does it work or not, but hope it does, because something similar trick already worked for some of us.

Regards,

Zoltán
 
Zoltan

What I am using with the SetSelection is a value that relates to fields in the BV. Will this work?

I am using F4211 in P4210. I don't think our administrator will let me try the most recent option you suggested.

Thanks for all your help.
 
Back
Top