You are viewing limited content. For full access, please sign in.

Question

Question

No Overload for Method 'ToString' takes 1 arguments

asked on May 25, 2016

Not sure if this is for SDK forum or workflow:

 

currently getting this error when I use the following in C# script:

object sql_selected = GetTokenValue("RetrieveFieldValues_SQL Selected");
string getsql = ToString(sql_selected);

trying to convert the value returned from the field to string instead of object so I can use in a string compare.

Or is there a better way to return a bool value from a compare that I can use for that case:

 

if( GetTokenValue("RetrieveFieldValues_SQL Selected") == "Customer's SQL Server"){}

I essentially want a returned TRUE bool for this case in the if statement above.  I just put it in an 'if' statement to show where I plan on using it.

0 0

Answer

SELECTED ANSWER
replied on May 25, 2016 Show version history

Actually found another quicker way with this:

bool sql = Convert.ToBoolean(GetTokenValue("RetrieveFieldValues2_SQL Selected"));

I run a workflow parallel and rename the value of the token to True if the condition is satisfied.  and pull this in the C# script.  Works perfect.

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.