I have this formula in my QueryOpen form event. It cheks of the logged in user’s OU is not same as the From field then prompts but the document still gets opened.
How can I stop the document from opening…something like Contnue=false equivalent in @formulas?? pl suggest…thanks
From:=@GetField(“From”);
@If(DocumentStatus=“Un Official Document” & @Left(@Right(@UserName;9);3) != From;@Prompt([Ok];“Message”;“This document is not available for review and is subjected to changes. Please wait for the review notification.”);@Success)
Subject: Urgent @formula
First, you have an easier way to get the ou in the username. Use @name([OU1];@username) or @name([OU2];@username) depending on the number of OU you have in the DN.
I would correct your formula as this:
From:=@GetField(“From”); @If(DocumentStatus=“Un Official Document” & @Name([OU1];@UserName) != @Name([OU1];From);@Failure([Ok];“Message”;“This document is not available for review and is subjected to changes. Please wait for the review notification.”);@Success)
Then replace you @prompt by @failure. It may work but I would suggest you to use lotusscript to do such things…
Subject: RE: Urgent @formula
OU part is working fine… @failure is only for input validations it doesnt work…
Can you suggest how can I include
@return in this to check the document from opening ?
Subject: RE: Urgent @formula
how about using a Do formula to include a return null statement?
From:=@GetField(“From”);
@If(DocumentStatus=“Un Official Document” & @Left(@Right(@UserName;9);3) != From;
@Do(@Prompt([Ok];“Message”;“This document is not available for review and is subjected to changes. Please wait for the review notification.”);
@Return(null));
;@Success)
Subject: RE: Urgent @formula
or include the @prompt in the @return