The syntax you have will set the variable to the value in the field Jobs::Document, not the name of the field. Is that what you want?
How are you using the result?
You may need to Quote the name of the field, if you are passing it to something else.
Please post the rest of your script.
oh duh.. that is true.
That wasn't my intention.
But now that you made me realize that I think I have an idea how to proceed.
Here is what I ended up with. i essentially have 5 variables
$sp = Gets the script paramenter
$fieldcontents = gets the contents of the container field based on $sp
$field = gets the name of the field (using quotes) based on $sp
$rep = gets the repetition number from $field (although I could have easily just set this up based on the $sp too and ditched $field)
$ex = Gets the extension of the filename in the container
$filepath = creates a temporary file path for viewing the contents of the container field
I posted a screenshot of the final script that's working for me
Thanks for replying
Just as an aside, you can make your calculation shorter by doing this:
Set Variable [ $field ; "Jobs::Document[" & Right ( $sp ; 1 ) & "]" ]
assuming you perform a little error trapping and verify you have the right values in $sp.
that's so helpful. Thank you!!!!