Products

Home Forums eaDocX queries Empty enum tagged value conditional formatting

Home Forums eaDocX queries Empty enum tagged value conditional formatting

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #8515

    Hi!

    I have tagged values which are defined this way:
    [code]Type=Enum;
    Values=Val1,Val2,Val3;
    Default=Val2;[/code]

    Unfortunately, with EA it’s possible that the tagged value is empty when you create it. It means, that on the screen it seems to have the default value, but in the background it doesn’t.
    When you open specification manager and show the column of the tagged value, you see in these fields with empty value, while the others have one. Or, if you create a script you see empty string in EA.TaggedValue instance’s Value field. Also, you can select this from EA’s db and you see the empty value there too:
    [code]select o.ea_guid AS CLASSGUID, o.Object_Type AS CLASSTYPE, o.Name, o.Stereotype, op.*
    from t_object o
    left join t_objectproperties op on op.Object_ID=o.Object_ID[/code]

    So, the main problem is, when I set up in eadocx profile a conditional formatting on this tagged value, it doesn’t detect emptiness. (Rule type=Empty, Replacement text doesn’t appear in generated document)
    If I do the same for a tagged value that doesn’t have any special configuration (no “Type”, “Values”, etc.), it works.

    In an older version of eadocx (I tested it in 3.7.5.4) this works.

    Can you fix/modify this behaviour?

    #8516
    eadocX Support
    Participant

    You can use the Conditional Formatting to add replacement text, and use the setting which eaDocX has for ‘no tagged value present’.
    This setting says what to put into the document when the TV has no value. Default is the string ‘n/a’.
    You can then create a conditional formatting rule which, for the tagged value you are looking at, when eaDocX sees ‘n/a’, just replace that with the real default – “Val2”. You can even color it, so that you can differentiate between TVs where the user has actually set a value, and those where the default is used.

    #8517

    Good idea, and it works where the tagged value really doesn’t exists. However, in my case, it exists, but doesn’t have any value, so it’s empty.
    I attach my test eap and two eadocx generated word file. test01.docx was generated with the latest eadocx, test02-with-eadocx-3.7.5.4.docx was generated with version 3.7.5.4. In the second one the “empty” rule works fine. In the first one neither the ‘no tagged value present’ setting + replacement solution nor the “empty” conditional formatting works.
    In the example eap there’s the element “Class1” which has a “test01” tagged value (defined the above mentioned way as an “Enum”). You can create other examples for this behaviour by creating new elements and adding them new “test01” tagged values, but do not select the value for them, let it have the default one.

    #8519

    I cannot upload the test eap, so I shared it here:
    https://mega.nz/#!YIggFIZA!WHoIwCPvzQy0QenYv2GCVK3931BRrLg04mEkAp414CQ
    (Click on the “Download through your browser” button to download.)

    #8521
    eadocX Support
    Participant

    OK – looks like I didn’t explain very well.
    eaDocX DOES detect that the tagged value is empty, but, before the Conditional Formatting bit gets to work, it already adds this default ‘n/a’ value. So by the time CF gets to work, it’s not empty any more. Hence my suggested solution.
    And no, I won’t be changing this : other feature rely on this behavior.

    #8522

    Hi,
    then I think I could localize the problem more specific:
    If you have an enum tagged value, and it’s empty, then in my case the newest EaDocX doesn’t do what you wrote it should.
    Enum tagged value:
    [code]Type=Enum;
    Values=Val1,Val2,Val3;[/code]
    (It’s without “Default”, because I realized this is reproducible without it more easily.) Don’t set any value for the tagged value, then in my experience, eaDocX

    1. doesn’t detect it as empty in the first step, so it doesn’t replace it by “n/a”,
    2. and doesn’t detect it as empty with CF
    3. and doesn’t detect it as “n/a” with CF (because of 1.)
    4. and doesn’t detect it as “” with CF (rule type=text; condition=same as; and I left the “value” field empty).

    Can you reproduce this behaviour, or for you, this works? I can send you a new eap for testing if it’s necessary.

    #8524

    I ran another test and I found that this problem only exists if I choose “table” style. With “inline” style eadocx doesn’t replaces value with “n/a” at the first step, but it recognizes the tagged value as empty.

    #8525

    Hello!
    Could you look at this problem, or have you still found it working well for you?

    #8526
    eadocX Support
    Participant

    I just tried this again, and I can seem to create Conditional Formatting rules for missing attributes (ones which have a value of ‘n/a’ because they are not present) for both table and inline formatting. Is this what you are doing ?
    My rules were both ‘text, same as’ ‘n/a’ ‘MISSING VALUE’ (color red)

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

Compare licence prices

Choose the licence that’s right for you and your team

Prices

Download a free trial

Download eaTeamWorks today for several free for life features, plus no obligation, 30-day trials of all the products: eaDocX, ea Revision Manager, eaSheets, Model Expert and PortfolioManager. Discover for yourself why we sell the world’s best-selling Enterprise Architect extension.

Download