Topic
  • 1 reply
  • Latest Post - ‏2014-02-07T02:52:41Z by ChrisHardy68
TerryMoriarty
TerryMoriarty
126 Posts

Pinned topic Auto Link Definitions where one is the key of the other

‏2014-02-06T22:43:32Z |

Is there a way to autoset one definition as the key to another definition?

One of my custom properties of "Data Element" is "Property Value" which lists all the allowed values for code data elements.  The definition "Property Value" has "Data Element" as its key.  When I have a definition of type "Data Element" (say X Code) open for edit and am entering a "Property Value", I want  the name X Code to be automatically set as the "Data Element" that is the key to X Code's "Property Value" (Say A).  The fully qualified name of the "Property Value" will be "X Code".A

Right now, I have to manually include X Code in the name of the "Property Value" when added through the "Data Element"'s "Property Value".

What I'd like is to have the "Data Element" automatically set as the key when the "Property Value" is added through the "Data Element" dictionary object edit window.

Can this be done?

Thanks

  • ChrisHardy68
    ChrisHardy68
    9 Posts

    Re: Auto Link Definitions where one is the key of the other

    ‏2014-02-07T02:52:41Z  

    Hi,

    I may have the syntax slightly wrong as I'm not in a position to test it but i think you need something in the usrprops like the following

    Definition "Data Element"
    {
        Property "Property Value"
        {
            EDIT
            ONEOF "Property Value"  
            KEYED BY
            {
                "Property Value": Name,
                NAME
            }
            REQUIRED
            READONLY
        }
    }

    Definition "Property Value"
    {
        Property "Property Value"
        {
            KEY EDIT
            ONEOF "Data Element"  
        }
    }