Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

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, OCONV

END ELSE

STATUS()=2

END

RETURN

ICONV:

IF BRANCH THEN
	OUT_VALUE=TRIM(OUT_VALUE)
END
CONVERT STAR$ TO DELIM$ IN OUT_VALUE

RETURN

OCONV:

CONVERT DELIM$ TO STAR$ IN OUT_VALUE

RETURN


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.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/d8fbc5867ac828d2852573ef000c3ac8.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1