Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: CStr function error in v11
Topic Summary: Worked fine in v10
Created On: 11/29/2017 04:09 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 11/29/2017 04:09 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

I just converted another task from v10 to v11. The step that experienced issues was a comparison of 2 values as such:

%CStr(dataset1.StringVal) <> CStr(dataset2.StringVal)%

The resulting error when the step was attempted:

Expression evaulation failed: "Null value can't be used here [*x__InternalSub1085|x__InternalSub1085#  4] Expr__LHS = (CStr(dataset1.StringVal) <> CStr(dataset2.StringVal))".

The dataset1.StringVal value really is a null/empty string, but the step ran fine in v10. To get around this, I removed the CStr functions from the step.



-------------------------
<html />
 12/01/2017 10:31 AM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 398
Joined: 03/17/2016

Hi James,

I haven't been able to reproduce the error.  Can you copy and paste the step from Task Builder?

How are you creating the dataset?



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

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 12/01/2017 11:46 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Devin,

Here's the copy from task builder, with the dataset and values renamed.

<AMIF EXPRESSION="%CStr(DataSet1.Val1)% <> %CStr(DataSet2.Val1)%">

Both datasets are being created from the result of a two different SQL csv queries from two separate csv text files.



-------------------------
<html />
 12/01/2017 03:06 PM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 398
Joined: 03/17/2016

Hi James,

Thanks. That was the same step I was trying.

Is the SQL query not returning anything back at all into the dataset?  Or just this cell in the dataset is blank?

If the SQL query is not returning anything at all, then the dataset column will not exist in v11.  In v10 the dataset would still exist but have no value.



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

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 12/01/2017 03:20 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Yes, both datasets are returning data, and some of the columns may actually be blank so in this case, the cell value for that particular row was indeed blank for one of the datasets. By removing the CStr function from the step in v11, the step was able to complete and allow the job to finish and create the output file.

It seems that in v11 the CStr() function failed because it was unable convert an empty cell to a string value.



-------------------------
<html />
 12/01/2017 04:45 PM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 398
Joined: 03/17/2016

Hi James,

Thanks.  I was able to get the error using SQL query to populate the dataset.  I submitted a bug report on this to development.



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

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 12/01/2017 04:47 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Awesome - thanks!



-------------------------
<html />
 12/08/2017 10:10 AM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 398
Joined: 03/17/2016

Hi James,

The bug number for this issue is #23595.  Thanks for your help in getting it reported.



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

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 12/08/2017 10:16 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

You're welcome -thanks for the follow-up!



-------------------------
<html />
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1866 guests browsing this forum, which makes a total of 1866 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog