Hi all,
I am having a problem with report scripting. I am currently trying to create a table where all components with failure kind "dangerous" and "diagnostic dangerous" are listed. We already have the following working code to create such a table where all components with failure type "dangerous" are listed:
{ m:for cmp | dc::DCComponentEntry.allInstances() }
{ m:if cmp.element.label = FMEDA.oclAsType(dc::DCWorksheet).components.oclAsType(dc::DCComponentEntry)->at(1).element.label }
{ m:if cmp.failureModes.user_failure_kind.toString()->includes('dangerous') }
{ m:for failures | cmp.failureModes}
{ m:if failures.user_failure_kind.toString()=('dangerous') }
[Table with components]I am now trying to also include "diagnostic dangerous" but I came about a very odd problem. When I change 'dangerous' to 'diagnostic dangerous' it still only lists the components with the failure kind 'dangerous' and not the components with 'diagnostic dangerous'.
{ m:for cmp | dc::DCComponentEntry.allInstances() }
{ m:if cmp.element.label = FMEDA.oclAsType(dc::DCWorksheet).components.oclAsType(dc::DCComponentEntry)->at(1).element.label }
{ m:if cmp.failureModes.user_failure_kind.toString()->includes('diagnostic dangerous') }
{ m:for failures | cmp.failureModes}
{ m:if failures.user_failure_kind.toString()=('diagnostic dangerous') }
[Table with components]I don't know what the problem could be. I also tested changing "dangerous" to "safe" and "test" and it did not change the output (I am in the right document though, as other changes had an effect). This is also the only code with open if statements at this point in the document, so it can't be interference from previous code. The if statements and for loops are closed after the table. So if the if statements simply evaluated to false, the table shouldn't appear at all.
Has anyone come across this before or any idea what the problem is?
Many thanks and kind regards,
Maria