Data bound forms and asterisk (OpenInsight 32-Bit)
At 13 FEB 2008 09:13:34PM Martin Drenovac wrote:
Two part question - we've a table where the key has an asterisk "*" as part of the key.
The Dict does not have the multi-part key ticked, the field posn is "0" and the name is CODE.
It appears that OI is auto-assuming this as a multi-part key and of course behaving badly.
1. How do we set OI to leave our keys alone?
2. Is there a way to set the auto-delimeter for multi-part keys to something else?
System in use 8.0.3.
Cheers
At 13 FEB 2008 10:06PM Barry Stevens wrote:
You you could use a udc for this to change the * to (say) ~ on save and restore on view.
Put it in the Validation and conversion field for the key. NOT TESTED
SUBROUTINE NoStar_CONV(TYPE, VALUE, BRANCH, OUT_VALUE)
EQU TRUE$ TO 1
EQU FALSE$ TO 0
EQU YES$ TO 1
EQU NO$ TO 0
EQU OTHERWISE$ TO 1
EQU NULL$ TO ""
EQU STAR$ TO "*"
EQU DELIM$ TO "~"
EQU OPERATION$ TO "ICONV,OCONV"
OUT_VALUE=VALUE
LOCATE TYPE IN OPERATION$ USING "," SETTING OPERATION THEN
ON OPERATION GOSUB ICONV, OCONVEND ELSE
STATUS()=2END
RETURN
ICONV:
IF BRANCH THENOUT_VALUE=TRIM(OUT_VALUE)ENDCONVERT STAR$ TO DELIM$ IN OUT_VALUERETURN
OCONV:
CONVERT DELIM$ TO STAR$ IN OUT_VALUERETURN
At 14 FEB 2008 11:58AM DSig wrote:
Barry's hack is a good way to get around this bug.
I say bug because the dictionary set to 0 should use the entire ID and not pretend it knows better.