Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Looping in the table to check the Rent End Date.

Featured Replies

Hi,

I like to create a program to keep tracks of the rental payment and I like to have the monthly receipt automatically generated when the date is near. Is there an efficient way do it other than looping through all the contract table? Thanks.

Kent

Does “keeping track” mean something along the lines of: Alert me when it's (say) three days before the first of the next month (aka “the date”), so I can click on a button, go to all (active) Contracts records, using a Receipt print layout, and have a receipt printed for each of my contracts for the coming month; and also have a date flag set on each contract, so I can see it's been done for this month, until about 30 days later the fun starts again?

EDIT: Forgot your looping concerns. Get back to you on that one.

  • Author

Thank you for your reply. Yes. Each contract for example has a start date and an end date. For example, Jan 2012(start date) to Jan 2014(end date), and will have a total of 36 receipts What I like to do is that when it is 4 days b4 the due date of the rent it due, it will automatically create a receipt for this particular month only.

If the contract doesn't have an end date, the tenant can live there as long as he knows when he likes to leave.

I was thinking if there are too many tenants, it will take too long to loop each contract if there are many tenants. Just hope if there is a more efficient way.

Many thanks.

K.C.

Why don't you find the active contracts, then import them into the Receipts table?

"Active contracts" would be those where StartDate < today AND EndDate > end of current month OR EndDate is empty (I think?).

If creating a receipt means creating a record in a Receipts table and print that one, then follow Comment's advice: Find the active contracts, then import them into the Receipts table and print from there, using the print option “Records being browsed”.

If on the other hand you don't have (or plan to have) a Receipts table, but just a print layout in Contracts, then find and print them there.

Either way, you don't need a loop for printing.

I think that if K. C. would like to be alerted shortly before the rent is due, then a contract that starts the following month (i.e. a few days later) would also have to be considered “active”, so startDate < today wouldn't always work.

Does ( startDate < today OR startDate = start of next month ) AND ( endDate > end of current month OR endDate is empty ) sound right?

K. C., can you get started from these ideas?

  • Author

Thank you Comment and EOS for your help. :)

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.