• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfExchangeTask Nulls

Explorer ,
Jun 23, 2009 Jun 23, 2009

Copy link to clipboard

Copied

Hi all,

I'm having a bit of a problem with cfExchangeTask in regards to null dates (yes, i know cf doesn't actually support null)

I want to set the due date of my task to null, however, when i send [empty string] to cfexchange, it throws a "not a date" exception!

if i don't pass the dueDate value when I edit my task, then obviously, the due date doesn't get updated.

Has anybody come up with any trickery to pass a due date to null it on the server?

as it stands i'm having to delete then recreate tasks without the due date (to set those null values!)

not happy jan

TOPICS
Advanced techniques

Views

772

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 23, 2009 Jun 23, 2009

Copy link to clipboard

Copied

I have used the following to try and experiment with null values, but neither seemed to work

<cfquery name="foo" datasource="#application.datasource#"> <!--- sql server 2005 --->
    select null as bar
</cfquery>
<cfdump var="#foo.bar#">

<cffunction name="GetNull" returntype="any">
    <cfreturn />
</cffunction>
<cfset foo = getNull()>
<cfdump var="#isdefined('foo')#">

the first of course, throws on the date check in cfExchangeTask and the second causes nothing to get changed on the updated task as the value is undefined

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 23, 2009 Jun 23, 2009

Copy link to clipboard

Copied

same result as null values from java

<cfset foo = CreateObject("java", "java.util.Vector")>
<cfset foo.setSize(1)>
<cfset bar = foo.get(0)> <!--- returns null --->
<cfdump var="#isdefined('bar')#" />

undefined...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jun 28, 2009 Jun 28, 2009

Copy link to clipboard

Copied

You might submit a comment on the livedocs page.  Obviously it is not the place for coding help 😉 But, I think it would be appropriate to ask if null dates are supported. Since it does not seem to be mentioned in the documentation - one way or the other.

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_d-e_17.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 28, 2009 Jun 28, 2009

Copy link to clipboard

Copied

LATEST

good idea! thanks.

I've submitted a comment.

in the meantime, does anybody happen to have any in depth knowledge about how getDate() works, perhaps that could evidence some possiblities.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation