December 14, 20187 yr Hi I have this fonction in a calculation field : "If ( Get ( TotalRecordCount )-Get ( RecordNumber ) >0 ; "perform record: present - (record +1)")" what I need is : if the current record is not the last then..... take the present value - next record value I also tried like this but I get "?" on every new record created. If I modify the calculation script then it run the calculation and everything work but for only old records, it s like the calculation run only one time on the creation. If ( Get ( TotalRecordCount )-Get ( RecordNumber ) >0 ; GetNthRecord ( FIELD ; Get ( RecordNumber )+1 )-GetNthRecord ( FIELD ; Get ( RecordNumber ) )) maybe I miss something, I don't get why it's not working ? thank you
December 14, 20187 yr I don't really understand what you're describing. Or why you would need such thing. I would just note that a calculation referencing the next record needs to be unstored. And even if it is unstored, it will not automatically refresh its displayed value when the next record is created/modified. That will happen only if you click into the field, or refresh the window. Note also that: 4 hours ago, ibobo said: If ( Get ( TotalRecordCount )-Get ( RecordNumber ) >0 ; GetNthRecord ( FIELD ; Get ( RecordNumber )+1 )-GetNthRecord ( FIELD ; Get ( RecordNumber ) )) can be simplified to = If ( Get (RecordNumber) = Get (TotalRecordCount) ; FIELD ; GetNthRecord ( FIELD ; Get (RecordNumber) + 1 ) - FIELD ) Edited December 14, 20187 yr by comment
December 14, 20187 yr Wouldn't such an unstored calc also have different results based on how the table is sorted? And have different results in a found set?
December 14, 20187 yr Just now, OlgerDiekstra said: Wouldn't such an unstored calc also have different results based on how the table is sorted? And have different results in a found set? Why yes, of course. Any calculation using Get(RecorNumber) is entirely dependent on the current found set (or related set, if used in portal) and sort order. That goes without saying (at least I didn't think it needed to be said). And since you point this out, it would probably be best to replace Get (TotalRecordCount) with Get (FoundCount).
December 14, 20187 yr Author Hi Comment, thank you maybe a should run a script to calculate that field , I ll do as you update it. I always come with strange calculation ))))
December 14, 20187 yr 14 minutes ago, ibobo said: maybe a should run a script to calculate that field As I said, i don't know what the purpose here is, so I cannot say.
Create an account or sign in to comment