For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
462 13 11 15

DSS REST API - Legal Entity Detail and Legal Entity Hierarchy - DeltaDays

Hello,

Recently we had a question about the "DeltaDays" condition which relates to 'Legal Entity Detail' and 'Legal Entity Hierarchy' report templates.

DeltaDays appears to relate to the drop down box in the GUI labelled "Include entities that have changed".

I just want to confirm what was shared previously as a resolution:

"The reference tree has the following for the Condition for Delta Days. It requires an integer. The underlying entity database field that the report template queries against is the last_chg_dt in the entity view.

Putting in a very large integer value will work so that ‘any’ last_chg_dt’ can be captured."

The feedback on the resolution is:

"I set DeltaDays to -1 and that seems to work"

That doesn't seem to match with the original resolution, please what would be the expected behaviour of the results using -1 over the advice provide which was based on the assumption:

SELECT entity.entity_id, entity.last_chg_dt, DATEDIFF(DD, entity.last_chg_dt, GETDATE()) as DeltaDays FROM entity.dbo.entity entity WHERE DATEDIFF(DD, entity.last_chg_dt, GETDATE()) >= 0

If there is a reference for more information of using DeltaDays please could I be directed to it please?

Best regards,

Gareth

dss-rest-apidatascope-selectdss
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks, AHS

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks, AH

Contact an expert (troy.dalldorf) to verify the answer.

Hi, reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
61 0 4 1

Gareth,

The way DSS is structured is as follows:

-1 => anytime
0 => today
1 => since yesterday
2 => within 2 days
3 => within 3 days
etc...

The -1 value basically just executes the extraction without looking at the underlying last_chg_dt in the entity database. 'anytime' means essentially whenever something occurred or basically there is no 'delta' here. In this situation DSS executes SQL that just pulls back the information. In other words it just does the extraction and pulls back the entity.

Putting in a large integer value gets the same result so long as last_chg_dt is populated for the entity as it takes that integer value and constructs a range to look for a value in the last_chg_dt. So long as last_chg_dt is populated you get the same result, but the -1 value and the large integer value is not equivalent in that the underlying SQL performed is different (although you get same results).

To be clear and clean the client should use and pass the -1 value.

thanks...

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
13.7k 26 8 12

I found a little bit more information in the API reference tree, here for Legal Entity Detail Condition:

LegalEntityDetailCondition:
Specifies the report conditions for the LegalEntityDetail report template.

Properties:

  • Name: DeltaDays
  • Data Type: int
  • Description: Option to extract only data that has changed for the specified number of days.

It is similar here for Legal Entity Hierarchy Condition:

LegalEntityHierarchyCondition:
Specifies the report conditions for the LegalEntityHierarchy report template.

Properties:

  • Name: DeltaDays
  • Data Type: int?
  • Description: Option to choose how far back to look for changes, in days.

It does not answer your query on the -1 value though.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
465 3 5 3

We have updated the REST API documentation to include these details. The change should be available in the 10.7 release. I have also put in a change request to make the delta days field nullable where a null value would be the same as -1.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.