Relevance check in action script

Hi All,

I trying to create a boot environment in via script in Solaris. Before executing the script i want to check be.txt should not have same name what user is giving while initiating action.

Pls help to achieve this.

action parameter query “BE_Name” with description “Enter the name of BE to create”

if { NOT (exists file ((pathname of (parent folder of client folder of current site)) & “/__Global/LUdata/be.txt”) whose ( exists line whose (it = {parameter “BE_Name” of action as string }) of it ))}

wait bash -c " lucreate -n {(parameter “BE_Name” of action)} "
endif

Thanks
Raja

What about that code isn’t working?

Yes James the below relevance is not working

if { NOT (exists file ((pathname of (parent folder of client folder of current site)) & “/__Global/LUdata/be.txt”) whose ( exists line whose (it = {parameter “BE_Name” of action as string }) of it ))}

1 Like

Now that I read it more closely, I see multiple issues. This is how I would write the relevance that belongs inside the IF statement.

not exists lines whose(it as trimmed string = (parameter "BE_Name") ) of files "__Global/LUdata/be.txt" of parent folder of client folder of current site

I’m not certain you are referencing the __Global folder correctly.

relevance provided by you is working fine as expected. many thanks James :slight_smile:

One of the main issues you had is that you had relevance inside { } but then you put another set of { } inside for the parameter. This doesn’t work. If it is all relevance, you only use one set of { }

You could use multiple { } like this: ( In ActionScript )

"First {"Second"} Third {"Fourth"}"

This would result in the following string being generated:

"First Second Third Fourth"

Understood now. thanks for your explanation