Jump to content
Server Maintenance This Week. ×

portal records on specific days???


anita hamis

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

Recommended Posts

Hi all,

I would like to make it possible to view the most recent records in a portal ,say for the past three days,and the portal to be updating itself as the days go by.

i've tried doing this using a script but am not getting succesful. i dont want to use a find Because that would mean a user being able to say show all.

any ideas?

anita

Link to comment
Share on other sites

How about setting a calculation field that says something like -

TodaysDate = Today

Then set another calculation field to be

ThreeDaysAgo = Date(Month(TodaysDate), Day(TodaysDate)-3, Year(TodaysDate))

These values will update every time you open the database or change a field in that record. After that, create a script that will find in the range of

ThreeDaysAgo ... TodaysDate

Just preset that into a script, or else just have the script enter that range into your actual date field.

I hope this helps.

Link to comment
Share on other sites

Sorry that was for a script in which you perform a find into a list view.

Actually, I thought of something - It will still require for you to do the find above using a script, but first create a field like DateRange and use that to determine whether or not you will show the data in the portal. Have the script reset all DateRange to "No" and then with whatever you find, have the script change the DateRange to "Yes". Create a portal that will relate to that set of files to a static field with value "Yes". The portal will then show only those dates.

Link to comment
Share on other sites

Sorry that was for a script in which you perform a find into a list view.

Actually, I thought of something - It will still require for you to do the find above using a script, but first create a field like DateRange and use that to determine whether or not you will show the data in the portal. Have the script reset all DateRange to "No" and then with whatever you find, have the script change the DateRange to "Yes". Create a portal that will relate to that set of files to a static field with value "Yes". The portal will then show only those dates.

Link to comment
Share on other sites

danjacoby put you on the right track. To see records from the past three days in your portal, make the primary key for the relationship a calculation field (text result) like so:

Date_Primary_Key=

code:


Date(Month(Date_Field), Day(Date_Field), Year(Date_Field)) & "
Link to comment
Share on other sites

This topic is 8121 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.