Hi everyone again!
In a view, we have 3 columns: Board, Port, Extension.
In a form, I have 3 fields: Board (dialog, select. formula, values not in list - allowed), Port (dialog, select. formula, values not in list - allowed), Extension (computed when composed) - computed based on Board & Port.
Selection formula for Board field is simple:
@Unique(@DbColumn(“”:“”;“”:“”;“View1”;1))
Here is a fun part. Selection formula for a Port field must select only those ports, which are already defined FOR A BOARD, DEFINED IN “BOARD” FIELD.
Any ideas?
Thanks in advance,
Dmitry.
Subject: @Unique(@DBLookup(“”:“” ; “”:“” ; “View1” ; Board ; “Port”; [FAILSILENT]))
Some notices:The first sorted column in ‘View1’ mus represent the ‘Board’ field
The ‘Refresh Field on Keyword Change’ property of the Board field must be set
The ‘Refresh Keywords on Document Refresh’ property of the Ports field must be set
Subject: Resolved through: @DbLookup
@Unique(@DbLookup(“”:“”;“”:“”;“View1”;BOARD;2))
Subject: RE: Resolved through: @DbLookup
OK, but don’t forget to validate that the final combination is valid. E.g. suppose you have in the view:
Board
Port
GEORGE
1
GEORGE
2
HOWARD
1
Editing the form, the user selects GEORGE, then 2. Then they go back to the BOARD field and change it to HOWARD. This results in the illegal combination HOWARD, 2. You need something in your input validation or translation to catch this sort of thing.