computation with ibpl-fields (migrated thread) | Posted: Jan 24, 2012 7:01 AM | extern.jens-uwe.nixdorf Posts: 68 Registered: Jan, 2010
|
|
| |
Hi @all,
in a form we have an ibpl-picklist, where the users can select (multivalued) a number of items. In a second field we count the selected items with "relcount(<fieldname of ibpl-picklist>)". This is not a problem, but now i need another computation: the items in above mentioned picklist is not filtered by states, but i need the number of thise items in a special state. How can i do this?
Thanks and regards, Jens |
Re: computation with ibpl-fields | Posted: Jan 25, 2012 4:52 PM |
| |
Posted By: Bradley.Johnston Posts: 5 / Registered: Feb, 2008 |
This syntax should work for this purpose: aggregate(<fieldname of IBPL-picklist>, Sum(State=="Desired State on Related Item"?1:0)) |
| Re: computation with ibpl-fields | Posted: Jan 26, 2012 2:39 AM |
| | Posted By: extern.jens-uwe.nixdorf Posts: 68 / Registered: Jan, 2010 | Aah, thanks, i'll try this. BTW: Whats the meaning of "?1:0" at the end of this line?
best regards, Jens |
|
| Re: computation with ibpl-fields | Posted: Jan 26, 2012 2:55 AM |
| | Posted By: matthias.rump Posts: 166 / Registered: Mar, 2008 | It's a "if - then- else" clause (like in Java or C)
<logical condition> ? <action in case of true > : <action in case of false>
As a result, the expression Sum(State=="Desired State on Related Item"?1:0)
counts every Item in the desired state with value 1 and all items in any other state with value 0.
See the computed fields expressions part of your user manual for details.
HTH Matthias |
|
| Re: computation with ibpl-fields | Posted: Jan 26, 2012 2:59 AM |
| | Posted By: extern.jens-uwe.nixdorf Posts: 68 / Registered: Jan, 2010 | Oh, thanks. I think sometimes its usefull to know how coding works
regrads, Jens |
|
Kind Regards,
Kael Lizak
Senior Technical Support Engineer
PTC Integrity Lifecycle Manager