Wizard
Wizard

Reputation: 11265

How do I compute a field value in a Lotus Notes/Domino form

"Rinka" - field type "checkbox" "Vadybininkas" - field type "text"

I want: if "Rinka" is selected "First" when in field vadybininkas will be "Pirmas"
I want: if "Rinka" is selected "Second" when in field vadybininkas will be "Antras"
I want: if "Rinka" is selected "Third" when in field vadybininkas will be "Trečias"

My code: @If(Rinka='First'; 'Pirmas'; Rinka='Second';'Antras'; Rinka='Third';'Trecias'; NULL)

But this if statment not work I plaece this code in "Default value", but field "Vadybininkas" is still empty, what is wrong ?

Upvotes: 0

Views: 725

Answers (2)

Phil Donaldson
Phil Donaldson

Reputation: 101

Also NULL is not defined in Notes, it will interpret NULL as a non allocated variable name which will have the default value of "" (empty string). NULL is not a defined state in Notes. Just a point but worth knowing!

Upvotes: 1

Tode
Tode

Reputation: 12060

Default value is only calculated ONCE when the document is opened. You need to change your field "Vadybininkas" to "Computed" and put this formula in the "Value"- Section.

In addition you need to tick the property "Refresh fields on Keyword change" for the Rinka- Field or set the "Automatically Refresh Fields"- Property of the form.

Upvotes: 2

Related Questions