IT Asset Manager / Connect-IT Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Assign Null Value

Occasional Advisor

Assign Null Value

I have a database->database connector and one of the target fields in a mapping requires to be set to NULL by the mapping. If I put in the mapping script the code "RetVal=NULL", there is a funny effect that this field is set to NULL but all following fields in the mapping which were filled not directly by a 1:1 source field mapping but also using a mapping script are now empty, too. If the first field is not filled using RetVal=NULL, the following fields are filled correctly (also when using a mapping script)

 

Is there a documented and recommended way to set a target field to NULL?

 

(Connect IT 9.51)

 

 

6 REPLIES
HPE Expert

Re: Assign Null Value

Hello Thomas, 

 

Depends on where you have set the script to give a null value.  ?? COuld you send us snapshots for the same ?

HP Support - If this post or any post helps you resolve an issue, please be sure to mark it as an acceptable solution.
Like a post, Please click Kudos to show appreciation !
Occasional Advisor

Re: Assign Null Value

Please see attachment...

Highlighted
HPE Expert

Re: Assign Null Value

Hello Thomas, 

Check the Programmers REf guide. 

 

 

 

You could use the  Function PifSetNullVal(strPath As String) As Long    Description. This function enables you to populate a node in the target document with the value 'NULL'. If the node does not exist, the function will create it.Input parameters

  • strPath: This parameter contains the full name of the node concerned by the operation. If this parameter is omitted or empty, the current node is selected. 

 

HP Support - If this post or any post helps you resolve an issue, please be sure to mark it as an acceptable solution.
Like a post, Please click Kudos to show appreciation !
Occasional Advisor

Re: Assign Null Value

If I use this function, then the field (type double) is filled with 0 (zero), not with the NULL value.

HPE Expert

Re: Assign Null Value

Thomas, 

 

Could  you send me a snapshot of what you implemented? 

HP Support - If this post or any post helps you resolve an issue, please be sure to mark it as an acceptable solution.
Like a post, Please click Kudos to show appreciation !
HPE Expert

Re: Assign Null Value

You could try using:
RetVal = Chr(0)

 

in the mapping. 0 is the null character, so this should set that successfully.

Jason Dowd
HPE Software Support

If this post has helped you resolve the issue, please flag it as solved.