Relevance assistance required

I have created one relevance where I am getting error and expression is not getting pass. Assist me here .

if (name of operating system as lowercase does not start with "win" ) then "not managed" else (if (not exists key "HKEY_LOCAL_MACHINE\Software\CRQ\Maintenance"   whose (value "Managed" of it as string as lowercase= "yes") of native registry ) then "not managed" else (if (exists key   "HKEY_LOCAL_MACHINE\Software\CRQ\Maintenance" whose (value "PatchOptIn_OptOut" of it as string = "1") of native registry) then "opt out" else (if ( (not exists key   "HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot" whose ((it != "all" AND it does not   contain (current month as three letters as lowercase)) of  (value   "months" of it as string as lowercase) ) of native registry )  AND (exists key "HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance" whose (value "RBkeyManaged" of it as   string as lowercase = "no") of native registry AND  exists key "HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot" whose (conjunction of (exists (it as  integer)  and it as integer < 5 and it as integer > 0) of substrings separated by "," of (value "Week" of it as string as trimmed string) AND (exists day_of_week (it)) of  (value   "DayAlpha" of it as string) AND (((last 4 of ("0000" & ((it / 60) as string & last 2 of ("00" & ((it mod 60) as string))) of (first 2 of it as integer * 60 + last 2 of it as integer - 10) of it) of ((value "WindowStart" of it as string) of key "HKEY_LOCAL_MACHINE\SOFTWARE\CRQ\Maintenance\Reboot" of native registry) as string)) > ((two digit hour of it & "" & two digit minute of it) of current time_of_day)) then "yes" else "no"

If you use the FixletDebugger, your should see that there are unclosed parenthesis which would be causing the error to occur

I would be inclined to break down the if…then…else statements to validate each one is correct then combine them one by one validating the statement still evaluates without error after each condition is inserted. My personal approach combining them is to start with an empty but parenthesized if…then…else then start inserting each statement. I just find it easier to insert already validated statements between the () placeholders

if () then () else ()

if (false) then ("B") else (if (false) then ("D") else (if (false) then ("E") else ("F")))
1 Like

Thanks a lot . Let me change it now .