cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

im createfield computation

JérômePadilla
1-Newbie

im createfield computation

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

2 REPLIES 2

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

Top Tags