Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Filling blank fields with dates

People, I have a problem in my database that I have a field called "[Claim Closed Date]", that sometimes it comes blank for me. I would like to create a rule for that, this rule has to be like this: I have another field called "[Status Claim]" and another one called "[Submitted Date]", so, I would like to put like this in the script:

...

[Claim Closed Date],

[Status Claim],

[Submitted Date],

....

if([Claim Closed Date] = "Blank (?)" and [Status Claim] = 'Closed', FILL WITH [Submitted Date] + "30 days",,)

how do I do such thing in the script??

1 Solution

Accepted Solutions

Re: Re: Filling blank fields with dates

Julio

I think you had a misplace bracket, try this.

    if( len(trim([Claim Close Date]))=0 and [Status Claim] = 'Closed', date( [Claim Opened Date] + 60 ) ,[Claim Close Date]) as [Claim Close Date],


Red ) added & second ) before as removed so leaving just one )



Best Regards,     Bill

14 Replies
jvishnuram
Contributor III

Re: Filling blank fields with dates

Hi Julio,

Try this

if(isnull([Claim Closed Date])  and [Status Claim] = 'Closed',  Date([Submitted Date] + 30)) as EXPECTED

Re: Filling blank fields with dates

if( isnull([Claim Closed Date]) and [Status Claim] = 'Closed', date( [Submitted Date] + 30 ) as [Claim Closed Date] ,

MVP
MVP

Re: Filling blank fields with dates

if( len(trim( [Claim Closed Date] ))=0 and [Status Claim] = 'Closed', date( [Submitted Date] + 30 ) as [Claim Closed Date] ,

Not applicable

Re: Filling blank fields with dates

this one doesn't work fine for me, because i would to be filled out inside the [Claim Closed Date], but thanks

Re: Filling blank fields with dates

Julio

This will put the data into a field called [Claim Closed Date]

if( isnull([Claim Closed Date]) and [Status Claim] = 'Closed', date( [Submitted Date] + 30 ) as [Claim Closed Date] ,

Not applicable

Re: Filling blank fields with dates

It doesn't allow me to have two fields with the same name in this case...

Re: Filling blank fields with dates

Julio

Then get rid of the original one and just leave the new one.

Not applicable

Re: Filling blank fields with dates

i did, it worked, but brings for me no data on this field now...

Re: Filling blank fields with dates

Julio

Can you paste in your load script.

Community Browser