Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

Dates Help in backend

Hi Experts,

Can any one please help me on below requirement.

I have the source like below

Source:

Load * Inline [

App,ID,Startdate,Enddate

Banking,4586A,05/10/2018 00:00:00,08/10/2018

Crime Analytics,5793B,25/07/2018 00:00:00,

Crime Analytics,8794B,13/07/2018 00:00:00,

HR,48632E,12/09/2018 00:00:00,13/09/2018

HR,58632E,05/08/2016 00:00:00,

HR,68632E,09/06/2018 00:00:00,

Service,8632O,03/09/2018 00:00:00, 06/09/2018

Service,86321,01/10/2018 00:00:00, 04/10/2018

];

In the below input we have 8 rows. Here I need to keep only the rows where both startdate and enddate is not blank  by using backend script.

Please help me on this.

Please find the below attached app.



Thanks in advance


Input

input.png

Expected output


expected output.png

1 Solution

Accepted Solutions
3 Replies
sunny_talwar

timpoismans
Specialist
Specialist

Do a resident load of your first table where you check the length of the two fields. If it's bigger than 0, include the row.

Solution attached as app.

kingsleyh
Partner - Contributor II
Partner - Contributor II

Hi Mahitha.

The IsNull() function doesn't work in this case because there are no null values in your inline table.

Source:

Load * Inline [

App,ID,Startdate,Enddate

Banking,4586A,05/10/2018 00:00:00,08/10/2018

Crime Analytics,5793B,25/07/2018 00:00:00,

Crime Analytics,8794B,13/07/2018 00:00:00,

HR,48632E,12/09/2018 00:00:00,13/09/2018

HR,58632E,05/08/2016 00:00:00,

HR,68632E,09/06/2018 00:00:00,

Service,8632O,03/09/2018 00:00:00, 06/09/2018

Service,86321,01/10/2018 00:00:00, 04/10/2018

]

Where Startdate<>'' and Enddate<>'';