Skip 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.

Track Popular Customers

Featured Replies

I was just wondering if someone can give me a starting point on this. I have a customer service database. We track our client orders with this. Our clients go through a lot of employees. We don't know when they leave the employ of our client. When showing our clients orders, I want to show our clients contacts in a portal sorted by the highest number of orders by a contact, over the last 30 days.

Table 1: Orders

Table 2: Client

Table 3: Client Contacts

Portal: Want to show contacts sorted by number of orders over last 30 days.

This way once a contact stops ordering our product because they no longer work for our client, they'll drop to the bottom of the list after 30 days or so.

Thanks!

Off the top of my head, I would make a summary report sorted by Client Contacts. Export the summary to a temp table. View the temp table in the portal sorted by number of orders.

You would have to do this by script. Clear the temp table, then find, sort and export.

Hi poslaw,

Another possible way ... If you create another table occurrence of your Orders (called ContactOrders) and attach it to your Client Contacts table (joined as indicated below), then create a calculation (number) called cCountOrders in Client Contacts with:

Count(ContactOrders::OrderNumber)

Create your Contact portal on your form layout and place your Contact and cCountOrders within it. You will have a count of orders by Contact restricted to last 30 days. Note that, if a Contact may also work for another Client, you will need to add the ClientID to that relationship to restrict the orders per Client. Remember to then sort that Contacts portal descending by cCountOrders. Include your date filter by creating a cDateLast30 calculation (result of date, unstored) with: Get(CurrentDate) - 30. Include that in your join as:

ClientContacts::cDateLast30 'less than or equal to' ContactOrders::OrderDate

AND

ClientContacts::ContactID = ContactOrders::ContactID

LaRetta :wink2:

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.