Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
We value your feedback – take our 5-minute QlikView modernization survey
cancel
Showing results for 
Search instead for 
Did you mean: 
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
bill_markham
Champion III
Champion III

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

View solution in original post

14 Replies
jvishnuram
Partner - Creator III
Partner - Creator III

Hi Julio,

Try this

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

bill_markham
Champion III
Champion III

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

maxgro
MVP
MVP

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

Not applicable
Author

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

bill_markham
Champion III
Champion III

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
Author

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

bill_markham
Champion III
Champion III

Julio

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

Not applicable
Author

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

bill_markham
Champion III
Champion III

Julio

Can you paste in your load script.