Ask the Expert

The R5 equivalent to !@ThisValue in R6

I'm not able to find any function like !@ThisValue in R5, as this formula is available only in R6. Could you suggest to me any way to achieve this in R5?
@ThisValue is not available in R5. You must just use the field name in the formula, e.g. instead of @If(@ThisValue = ""; @Failure("You must enter a document title."); @Success), you would write @If(Subject = ""; @Failure("You must enter a document title."); @Success).

The nice thing about @ThisValue and @ThisName is that you can write generic formulas that can be used in different fields without modification. This is especially handy where you have a large number of similar fields -– it makes it much easier to make sure that all the fields' formulas are referring to themselves.

For instance, you have fields named xxx1, xxx2, xxx3, etc. in the first column of a table; yyy1, yyy2, yyy3, etc. in the second column; and so on.

Another option in a case like that is to do your input translation or validation using LotusScript in the document's Querysave event. If there are a large number of fields with similar names and the same validation rules, you can use a For loop to iterate through all the table rows.

Set doc = Source.Document
For i = 1 to 15
 Xxx = Fulltrim(doc.GetItemValue
("xxx" & i)(0))
 Yyy = doc. GetItemValue("yyy" & i)(0)
 If xxx <> "" And yyy = "" Then
  Msgbox "You must enter a
 value…
  Continue = False
 End If
Next

Do you have comments on this Ask the Expert question and response? Let us know.

This was first published in May 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: