Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Date Range Relationship


Recommended Posts

This is a tuffy!

ok what i need is a date range for a relation ship to a file.


for instancei have dates 6/15/03 6/16/03 6/17/03.... in child file (fileB) the relationship calc for this is:: ID & Date


In Parent (fileA) i need a calc that will have a date range of 30 days based on Id & Date range. I want this relation so i can show this information in a portal.


any ideas??

Link to comment
Share on other sites

Hello Tyson,

There are a number of ways to generate range relationships - however you've not said how the range should relate to the originating date (eg 30 days starting from the original date, thirty days ending on the date etc etc).


Regardless of that, the requirement you've outlined can probably be achieved relatively simply by using a calc which produces a composite multi-key value of fixed length. The formula will be something along the lines of:


ID & gStartDate & "¶" &

ID & (gStartDate + 1) & "¶" &

ID & (gStartDate + 2) & "¶" &

ID & (gStartDate + 3) & "¶" &

ID & (gStartDate + 4) & "¶" &

... etc


...through to gStartDate + 30, where gStartDate is a global date field into which you input a date you want the range to start from.


With this in place as the left key for the relationship, the related records will always include everything which matches the ID and which falls on the gStartDate date or any of the subsequent 29 days. cool.gif

Link to comment
Share on other sites

hey ray thanks for the tip i fugured it out after playin a lil more just had to take a break from it been workin on these Db's for about 6-7 hrs now!!


Thanks Again



Link to comment
Share on other sites

  • Create New...

Important Information

Terms of Use