June 5, 20178 yr Hi, i have the following situation: i have invoice table, that has all my records, when i enter into this layout list, it has to load all data, depending of internet connection it may take a while. I would like to restrict it, when i go to layout it shows only current month data, with out portal thanks for any help
June 5, 20178 yr You could create a script that does the 'Find' that you require, and restricts the number of records. Something like :- Set Variable [ $startOfMonth; Value:Date ( Month ( Get ( CurrentDate ) ) ; 1 ; Year ( Get ( CurrentDate ) ) ) ] Perform Find [ Specified Find Requests: Find Records; Criteria: Invoice::date: “≥$startofMonth” ] [ Restore ] Then you should add a script trigger to your layout using the 'OnLayoutEnter' option, that runs your script from above. This is quite crude, and would perform this find every time you enter that layout so you may need to refine it, but this would give you a starting point.
June 5, 20178 yr Author 1 hour ago, Lee Smith said: Hi Helder, and welcome to the FM Forums, I sent you a Private Message. Lee Sorry, i did not get anything
June 5, 20178 yr Hi Helder, Thank you for replying to my Private Message. I hope you have had a chance to read the links I posted, especially Anatomy of a Good Topic? Are your records being served by FileMaker Server 14? Lee
June 5, 20178 yr 9 hours ago, rwoods said: Then you should add a script trigger to your layout using the 'OnLayoutEnter' option, that runs your script from above. This is quite crude, and would perform this find every time you enter that layout so you may need to refine it, but this would give you a starting point. You're on the right track, but the problem here is that the script would trigger after you've already landed on the layout so the server would still have to download whatever records happened to be in the found set. You should create a simple layout that's based on a layout with zero (or very few) records. Set this layout as your startup layout. Attach this script to a button on that layout: Enter Find Mode Go to Layout[ invoice list] Set Field[ date ; Month ( Get ( CurrentDate ) ) & "/" & Year ( Get ( CurrentDate ) )] Perform Find You don't incur a penalty when you go to Find mode before you go to a layout. The server doesn't download data until you go back to Browse mode (after the Find).
June 6, 20178 yr Author 9 hours ago, Lee Smith said: Hi Helder, Thank you for replying to my Private Message. I hope you have had a chance to read the links I posted, especially Anatomy of a Good Topic? Are your records being served by FileMaker Server 14? Lee yes, it is on FMS 14
Create an account or sign in to comment