en@frrom
11th March 2004, 21:33
Hi all,

I have a display session with form type 3.
When selecting a (view field) record via spyglass (choice.def.find) and there are no values for the selected view-field, then default the program breaks to the next view that contains values.

I want that in case there are no lines to be displayed for the selected value, it should stay and show no lines, instead of breaking to the next view.

I think the predefined variable break.view is meant to do that, but I tried to apply it [don't know where in script, but I tried both in before.program and right after the query.select..], and it doesn't seem to work...

Kind regards,

En.

lbencic
12th March 2004, 17:23
Hi again En -
I have tried that break.view before without success. Not sure how they want it to work. I would think before program is the right spot, but I just tried again and it did not help.

If you are handy at your OS and have the source, you may run a search for "break.view" on the standard scripts and see if they use it anywhere and how. (I am not so handy, but have notes somewhere, let me know - if you need I will try that here)

For a functional solution :rolleyes: use the Start Set button (><) instead, it does what you need. Over the years the users will be beaten into submission by Baan no longer complain. Good luck and bless your heart for trying to find a solution to these basic annoyances. Let us know if you do.

en@frrom
12th March 2004, 17:33
Lisa, your functional workaround idea will not help in this case, because this is the type of session where you have filtering options in form commands (via specific). So let's say you're pointing at a group, and then you filter a specific option, and the result leaves you with no more records for that group, the session will now display the next group, and I want to stay at the current, just show no records...

Regards,

En.

lbencic
12th March 2004, 17:43
Ahh. You may try using query extensions. I have done this on zooms to make sure it does not go to the next group if no records exist for they key fields passed in the zoom.

Example:

zoom.from.all:
on.entry:
import("item.code", item.code)
import("cwar.code", cwar.code)

query.extend.where("whwmd215.cwar = :cwar.code")
query.extend.where("whwmd215.item = :item.code")
rebuild.query()
execute(find.data)


Maybe you can do something like that in the before choice / after choice of the filter sections.

en@frrom
12th March 2004, 17:52
Lisa,

Thanks, indeed meanwhile I had already sorted the filter functions out, and when due to filtering a current group there will be no more records anymore for display, then the group will still not change to next view.

But the other issue remains (unless using workaround). I will have a look into it after the weekend to find some solution; it must be possible!

Thanks meanwhile for your attempts and the enouragement... ;)

Ciao,

En.

nick_rogers
12th March 2004, 18:07
Are you sure that the last used record is not being brought up ?

check the ttadv990 table.

en@frrom
15th March 2004, 10:43
Nick, this is not about the value displayed when first opening the session, but after searching for a record using the spyglass, and when for the selected record (view group) there are no lines to display, then the system breaks to the next record which has lines to display.

en@frrom
15th March 2004, 11:46
Hey all,

I have found the solution for this, and also around the functionality of break.view:

The default value of break.view is false, i.e. standard Baan when searching for a group which has no multi-occ lines to be displayed, the program does NOT break to the next group. By setting break.view = true, the program WILL BREAK to the next group with available lines.

However, there is something else determining this, and till I figured that out, I didn't get it working right: I just added a execute(find.data) in the before.choice of the def.find section, and that does the job.


Kind regards,

En.