Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2436 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi, I am using this calculation in portal which calculates days in portal  Date - (GetNthRecord ( Date ; Get ( RecordNumber ) - 1 ) )

how can i modify or do something else to avoid (?) in the first row.  Sample file attached for any modification/help.

Thanks for any help

DateCalc.fmp12

Posted

What's are you wanting this calculation to do?

The result shown in the field is hit and miss on what it is displaying.

 

DateCalc.png

Posted

I want the difference between two dates (days). The solution i am working is about submitting applications by person on different dates and report on how many days have past since the last submitted application date. 

Posted

This sounds like a timesheet, have you tried Start Date and End Date and elapsed time?

Posted

It is getting an error on the first entry for each ID where there is no Nth record to get the previous date from.

Posted
1 hour ago, Aussie John said:

It is getting an error on the first entry for each ID where there is no Nth record to get the previous date from.

yep thats the problem. is their any other calculation to get days between dates in portal rows.  something like which starts calculating from second portal row and ignore the first row or put the calculation in second row.

some calculation like    ....Calculate the days between portal rows and don't calculate the first row or blank if dates are same.

Posted

I can’t test this but

case(GetNthRecord ( ID ; Get ( RecordNumber ) - 1 ) =ID,

Date - (GetNthRecord ( Date ; Get ( RecordNumber ) - 1 ) ),

0)

there are probably more elegant solutions

Posted
1 hour ago, Aussie John said:

I can’t test this but

case(GetNthRecord ( ID ; Get ( RecordNumber ) - 1 ) =ID,

Date - (GetNthRecord ( Date ; Get ( RecordNumber ) - 1 ) ),

0)

there are probably more elegant solutions

the result is always zero 0 i will try the case statement with different setting  thanks for helping

Posted (edited)

Ash

Sorry my error the reference to ID should be person ID ( ID_person) not the Date record ID which is irrelevant

Temporarily, to see your results change instantly it helps if Datecalc is unstored

 

Case(GetNthRecord ( Date::id_Person ; Get ( RecordNumber ) - 1 ) =Date::id_Person;

Date::Date - (GetNthRecord ( Date::Date ; Get ( RecordNumber ) - 1 ) );

0)

I should add that a change in the sort order will ruin your results.

Edited by Aussie John
  • Thanks 1
Posted

Thanks Aussie John for help the case statement solved the problem here is my screenshot of original solution (the dates are local i mean not Gregorian calendar )

datecalc.JPG.df7720e6b271f5c5fb35a2a3ac4113dc.JPG

This topic is 2436 days old. Please don't post here. Open a new topic instead.

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...

Important Information

By using this site, you agree to our Terms of Use.