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.

Featured Replies

Hello,

Issue:

I have Sales Activities Portal on each company's record, now I want to list all first rows of portals from each company record on another layout. Now, I also want only those rows with non-empty follow-up date fields too. My Portal is sorted by Activity Date in descending order. 

What I have done:

I have onlayoutenter script as below:

Enter Find Mode
Set Field[Daily Log::date_followup; "*"]
Set Field[Daily Log::date_activity; Max(Daily Log::date_activity)]
Perform Find[]

It is fetching all records from each Portal which has non-empty follow-up date value

 

I want only highest activity date value row from each portal 

Edited by dav1089
typo

I would suggest you produce this report from a layout of the child table (Sales Activities? Daily Log?). First, find the records where the follow-up date field is not empty. Then sort the records by company and by date and show them in a layout with only a sub-summary by company part (i.e. no body part).

  • Author

I am using daily log table(child table) to produce report , on the same layout I have made it to sort it by Sales Person and Activity Date (Sub-Summary : Sales Person).. I have attached the screenshot of how it looks (Layout and script)

I don't want duplicate company daily log sales activities from daily log Portal for each company, instead I only need first record (obviously highest activity date as Portal is sorted by activity date in descending order)

Screen Shot 2016-04-05 at 10.20.43 AM.png

Screen Shot 2016-04-05 at 10.22.18 AM.png

  • Author

I also tried creating calculation field in company table which calculates max activity date and used it to find first row with highest activity date.. but had no luck

It cannot work the way you're trying to make it work. Suppose you have 5 companies:  in order to find the 5 most recent records, you would have to perform a find with 5 requests, each with a company ID and the most recent date of that company (which you would have to collect before entering Find mode).

Note also that when you are in Find mode, the expression Max(Daily Log::date_activity) returns empty (and I suspect it does not return what you think it does in Browse mode, either).

My point is that you do not need to do all that. Instead of finding only the most recent records in each group, find all of them (that is those that meet your other criteria regarding the follow-up date) but show only data from the most recent ones, and hide all others.

 

Edited by comment

  • Author

okey.. So how do I show only most recent ones? 

As I said: use a sub-summary part (by CompanyID) to show data only from the first (or last) record in each group.

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.