jcook331
13th February 2005, 17:49
I am trying to allow the user to zoom to different sessions from a form field depending on what they enter in another field. Behind the field on the form I say I am zooming to a session and then control which session inside the program script. However, there is one condition where I need to zoom to a menu. Since I said I was zooming to sessions on the form, when I try to zoom to the menu inside the program script I get a BW message that I have no permissions to do that. Is there any way to change the zoom attribute on the form from session to menu inside the script. Any way around this? -Thanks

Hitesh Shah
14th February 2005, 12:36
Change attr.zoomcode to z.menu. It's set to z.session due to ur form settings. In case of z.menu , return string value of zoom.to$ function will return the value returned from any selections in menu.

jcook331
15th February 2005, 00:01
Thanks for the input. I tried that, but I still get the BW message
Fatal error : No permission for
when I try to zoom to the menu. I am inserting the code. Maybe I'm just overlooking something. - Thanks

field.lflfa352.ciid:
before.zoom:
child.rec.type = ltoe(0)

select lflfa354.*
from lflfa354
where lflfa354._index1 = {:lflfa352.cint}
selectdo
child.rec.type = lflfa354.rect
selectempty
child.rec.type = ltoe(0)
endselect

on case child.rec.type
case lfrec.type.na:
message("Info Type Cannot Be A Child!%Check Record Type On Info Record.")
break
case lfrec.type.sitm:
attr.zoomsession$ = "tiitm0502s000"
attr.zoomreturn$ = "tiitm001.item"
break
case lfrec.type.eitm:
attr.zoomsession$ = "tiedm0511s000"
attr.zoomreturn$ = "tiedm010.eitm"
break
case lfrec.type.citm:
tipcs021.cprj = lflfa352.sprj
attr.zoomsession$ = "tipcs2522s000"
attr.zoomreturn$ = "tipcs021.item"
break
case lfrec.type.info:
attr.zoomcode = z.menu
zoom.to$("mlflfa1350men1", Z.MENU, "lflfa1352m000", "", 0)
break
case lfrec.type.other:
message("Zoom to Other Drawings Display Here")
break
case lfrec.type.released:
message("Zoom to Released Drawings Display Here")
break
default:
message("A record type needs to be added to this Info Type in session lflfa1354m000.")
endcase

Hitesh Shah
15th February 2005, 06:39
U can try 2 things.

1. After zoom to menu (lfrec.type.info), set the attr.zoomcode to 0 .
In this case u need the return value of the zoom.to$ statement to get
the return value from the menu.
2. Set attr.zoomsession$ to mlflfa1350men1 and do not write the zoom.to$
statement.

Either should work for u.

jcook331
15th February 2005, 17:53
I used #2 and it seems to be working.
Thanks