Parsing relevance inside a relevance in action script

I am creating a dynamic relevance to check the if else condition, as below

action parameter query “Error_Folder” with description “Please enter the Folder Name and Path” with default value “”

if {exists file “{parameter “Error_Folder”}/CheckService.txt” whose (exists lines whose (it as string as lowercase contains “Active: inactive” as lowercase)of it )}
parameter “Checkserviceerror”="Postgresql.service are not active"
notify client ForceRefresh
Exit 100
endif

Now when ever i am running this it is showing as:
Command failed (Relevance substitution error.) if {exists file “{parameter “Error_Folder”}/CheckService.txt” whose (exists lines whose (it as string as lowercase contains “Active: inactive” as lowercase)of it )}

And if I am running this as direct using the exact file name then it is working fine, like below:-1: if {exists file “/temp/CheckService.txt” whose (exists lines whose (it as string as lowercase contains “Active: inactive” as lowercase)of it )}

How can I use the paramters in if else relevance clause inside the action script

You don’t need to use embedded { } symbols when already in a relevance substitution. Try

if {exists file (parameter "Error_Folder" & "/CheckService.txt") whose (exists lines whose (it as string as lowercase contains "Active: inactive" as lowercase)of it )}