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

Question

Question

Is there a way to change the token tags in the Run Rule activity?

asked on September 24, 2020

I have created a Lookup Table Query to insert a row into a lookup table. In the lookup table, the column is defined as an integer, and the token I'm passing to the activity is an Integer. However, when creating the query there is no option to set the data type and when I look at the Run Rule activity, it is defining the token as a String rather than an Integer. Is there a way to change this that I'm just not finding? It is understandably causing the workflow to fail when it runs, since the table is expecting an integer rather than a string. (Screenshot attached of the Run Rule parameters)

Run Rule input parameters.PNG
0 0

Answer

SELECTED ANSWER
replied on October 7, 2020

After opening a support ticket, what fixed this was republishing the rule.

2 0

Replies

replied on September 24, 2020

Hi Shauna-

If you're getting an error about converting a string to int, the problem might be that you don't have a value in the EvalResult token. When WF does a database write it will send an empty string and SQL doesn't like that for int/numeric fields.

To get around that issue, you can use the token editor to say "if the token is empty, send null"; hopefully that will correct the issue you're encountering.

 

It's described in this page of the help files, though it's a little confusing. Basically, use the Token Editor with the Apply Formatting option with a value of NULL  If the token is empty, it will send a null instead of an empty string.

 

 

1 0
replied on September 27, 2020

Is this the same functionality between on-prem and Cloud (I ask because the screenshot you posted is from on-prem)? That token was not populating, but changing the database to expect a string and not an integer (not ideal) caused it to work so I'm unclear if that would have solved the issue. What populates the EvalResult token?

0 0
replied on September 28, 2020

Yes, I'm referring to on-prem solution. Sorry, didn't realize you were Cloud, and haven't worked with Cloud so can't say if this is the same thing, though it sounds like it. But since it wasn't populating it sounds like this null trick might help.

I can't speak to what populates the EvalResult token. It's an output parameter on your workflow so would need to be populated within the workflow itself.

0 0
replied on September 28, 2020

Hey Shauna, 

There isn't a way to change the token type going into the Lookup Table Query, since the type should be matching what's in the Lookup Table itself. 

Could you try downloading and reuploading the table and making sure that the type on import is 'Integer'?

-Kevin

0 0
replied on September 28, 2020

Hi Kevin,

I tried that initially and no luck sadly.

0 0
replied on September 29, 2020

I would say then open a support ticket with all of the details attached and we can look into it further.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.