Is there a way to decide programmatically whether I’m in a modal window or not?
Why would I want to know that? When I display a document in a dialogbox I e.g. don’t want to show a doclink (since the user would not be able to view the linked document). But when I display the same document in a “normal” window, the doclink could be shown (and also clicked successfully).
Ruedi
Subject: Modal window or not?
I am not aware of any existing function/property. But you can achive the same using below trick.
Create a field on the form for say “IsModalWindow”, and use this field value as hide when formula for the doclink.
when you open the document in the dialogbox just before that set this IsModalWindow Item to 1 (you do not need to save the document). the form which is used in dilogbox will calculate the hidewhen for the doclink field and make it hidden.
Rohit
Subject: RE: Modal window or not?
@Rohit: Good idea. Not yet sure whether it will solve my problem but definitely something to think about.
Many thanks
Ruedi
Subject: RE: Modal window or not?
If you do that, make sure the field is computed for display so it won’t give a false positive next time the document is opened in read mode normally.