Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi All,
We are trying to create a field using the command line function im createfield with a computed expression.
My command line failed with the message "error creating field parent or child: syntax error"
could you please tell me what's wrong with my following code :
im createfield --user=administrator --hostname=win-h9j0fcrdcqu --port=7001 --type=shorttext --computation='((aggregate("Forward Relationships",count() ) ) > 0) ? text("parent") : (((aggregate("Backward Relationships",count()) ) > 0) ? text("child") : text("orphan"))' --name='parent or child'
for your information,
going through the Integrity client admin GUI, I can create the "parent or child" field with the computation value : "((aggregate("Forward Relationships",count() ) ) > 0) ? text("parent") : (((aggregate("Backward Relationships",count()) ) > 0) ? text("child") : text("orphan"))"
Did I miss something?
Thanks a lot in advance for your help,
Jérôme
I think in the command line for creating a calculated field you also need to supply the --storeToHistoryFrequency=[never|daily|weekly|monthly|delta] and --[no]staticcomputation parameters.
In the admin gui those values are probably set with the defaults.
Also I noticed you are using "aggregate("Forward Relationships",count() ) ) > 0".
Is there some advantage of this over using "RelCount("Forward Relationships") > 0" or "RelExists("Forward Relationships")" for the same functionality?
Matt Giltaji
Hello Matt,
Thanks a lot for your answer.
I've inserted the storeToHistoryFrequency and staticcomputation parameter and change the expression to RelExists one and that works properly now.
Thanks again,
Jérôme