Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6310 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

i need to pass multiple parameters to a script. i was doin this via word lists. but the word list would cull operators which i had within the parameters. so the next soultion is to pass via vaule lists this is what i am sending

${Jobs (Timesheet Reference)}::Job Number) & "¶" & Timesheet Project Entry::Task Number

but when a rip the values out of the list on the other side i still have random characters on the end ie 'the square' :

now i assume this is possible or there is other ways to do this. i could do global variables but my coding backgrounds refuses to give in :

so has anyone got any ideas, sure you guys do. the community has been alot of help so far

Brendan

Posted

the square probably indicates some character that can't be represented in the font... This must come from somewhere. Are you sure there is nothing on the end of the last field referenced in your parameter?

Well, I do script parameters with a couple of custom functions so they can be sent and worked with as named parameters.

Here are the 3 functions:

---------------------------------------------------

/*

parm (function name)

parm_name (parameter 1)

value (parameter 2)

*/

parm_name & " = "" & value & """

// this builds a named script parameter

---------------------------------------------------

/*

nparm (function name)

parm_name (parameter 1)

value (parameter 2)

*/

"; " & parm_name & " = "" & value & """

// this creates a following script parameter for a parameter list

---------------------------------------------------

/*

GetP (function name)

ParameterName (parameter)

*/

Evaluate(

"Let ( [ " & Get( ScriptParameter ) & " ]; " & ParameterName & " )" )

---------------------------------------------------

To install, paste the chunks of code into the Custom Function dialog, copy and paste the name to the correct place, copy, paste and add the parameters. Once you've created all three, they work like this:

To build a script parameter

parm("myparm";"some text") & nparm("thing";$$variable) & nparm("another";mytable::myfield)

This will make the parameters named myparm, thing and another.

Always start with the parm() function and follow with as many nparm() functions as you need.

To get the parameters for use in a script :

GetP("myparm")

Pretty simple. Hasn't given me any problems.

Don

Posted

solved it. it seems that

GetValue (Get( ScriptParameter) ; 1 )

GetValue (Get( ScriptParameter) ; 2 )

Works, but before I was using left value which returns the carriage return as well.

LeftValue (Get( ScriptParameter) ; 1 )

LeftValue (Get( ScriptParameter) ; 2 )

thanks for your help, i need to get advanced asap i think :

This topic is 6310 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.