How to compare a string value with values in enumeration in SRL

82 Views Asked by At

as I am very new to blaze advisor and SRL. I am trying to compare a value with the elements in enumeration by Iterating it. below is the code.

    for each  CompanyList do 

{

if(anApplicant.employementDetail.organisation=it) then{ print("companies" it). break.

}

But I am getting error saying

Error: 'type' and 'string' are incompatible types.  main.advprom    /assignProject [New Repository]/assignProject Folder/Testing    line 718    Blaze Advisor Compilation Problem

I can say that this is valid error, but I wanted to know how I can compare a value using Structure rule language.

1

There are 1 best solutions below

0
On

Use Casting

if(foo = (it as a string)) then { }

Even after this you will face another issue, regarding unsupported keyword. ( break )

There is No such thing like break, remove it.