cancel
Showing results for 
Search instead for 
Did you mean: 

Automation Chain + date null : Set a Date var to null ?

milonette_
Star Collaborator
Star Collaborator

Hello,

I want to init a Date variable to "no value". Is it possible ?

thank you

1 REPLY 1

milonette_
Star Collaborator
Star Collaborator

Hello Me,

The widget date always show a defaut date if date is null. No way to have NO VALUE for the widget date.

You have to go arround the problem.

A) Set a document property to NULL

Document > remove property

B) Use a not mandatory workflow var that user will not change using the widget and it should be still to a default "null" value.

  1. run a script where you Define a default date : wkDefaultDate to 01/01/2999

  2. Run a script to initialize your var

    WorkflowVariables["myDate"]=WorkflowVariables["wkDefaultDate"];

  3. if needed to set to null workflow var date // After the node with the date widget => if the user didn't change the date

    Run Script if(WorkflowVariables["myDate"] ==WorkflowVariables["wkDefaultDate"]){ WorkflowVariables["myDate"] = null; }

  4. If needed // Before enter in (input node) the node with not date widget, reset the date to defaut :

    Run script if(WorkflowVariables["myDate"] == null){ WorkflowVariables["myDate"] = WorkflowVariables["wkDefaultDate"]; }

  5. Update the document-property later with the workflow var not mandatory saved value if needed: Run Script

    if(WorkflowVariables["myDate"] != null && WorkflowVariables["myDate"] !=WorkflowVariables["wkDefaultDate"]){ Document.doc.setPropertyValue("myxpathname:myDate",WorkflowVariables["myDate"]) ; }

Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.