Jump to content

How do I "blank-out" (null) a custom date field? Or even set 'empty' if not null


Berto2002

Recommended Posts

I have a workflow that feeds a report that goes into Power BI. I want the report to use conditional formatting to place a green icon against a RequestID when there is a 'next' problem review scheduled and a red icon when there is not one scheduled.

To achieve this I had planned to detect if custom 21 (date/time) is blank or not. The Workflow would place a date/time in custom 21 when one was planned (through Human Task) but then nullify that value (through expiry) once the date has passed.

My testing to run the node Service Manager > Enitity > Requests > Update Request > Custom Fields and then set the field to Manual but leave no value did not achieve the goal:

image.png.1cb36d30ee4b06b486f88156ec463c20.png

Is there a way to nullify (or even 'empty') a custom date/time field please?

PS my workaround would be to pick a date "long long ago in a galaxy far far away", 1978-01-29 00:00:01, for example, and have that as my null equivalent value for Power BI purposes; but it's a kludge.

Link to comment
Share on other sites

  • 4 months later...

Hi @Berto2002,

Did you ever manage to figure this out?

I need to be able to do this but not on a date time field, but against the Asset Used By field using the Update Mobile Device Assets - General Information node.

Link to comment
Share on other sites

Hi @samwoo no, I cannot blank the date/time. Instead, when I needed a date to be blank, I resorted to setting the value to a fixed meaningless value I could interpret as zero in the workflow and reporting: 1978-01-29 00:00:01. I then use the expression if value is that rather than if value is not set.

For assets Used By that we want to 'blank', we set to "AssetUserUnknown" (a non-user Account value) or one of the other similar types. Our policy is never to have an asset without a Used by. We originally implemented this approach because we could not (and still cannot) edit and add to the list of either Asset State or Operational State fields:

image.thumb.png.3a3c6f3ceed1c18ba52d24ee66c05efa.png

 

Link to comment
Share on other sites

Hi @Berto2002,

Thanks for responding.

In terms of my issue, I have figured out how to do it in the Workflow, you can simply set the Used By value to Manual but don't select anyone, and it removes anything in Used By field of the Asset when updating Assets (by type) via the Workflow:

image.png.848faf2e24d07847336b1c27caa00d7e.png
 

Here is what the Asset History looks like (I tested setting Asset State to Archived, and the Sub State to stolen)

image.png.f36482d7961665d0ed8641e9a51e6265.png

Hope this helps somewhat.

Thanks,

Samuel

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...