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 Everyone,

 

Here I am again, my second post:

 

Here is the scenario

 

I have drop down field Report with the following Values (Bottles, Cans and Plastics), If the value of my Report = Bottles or Cans or plastics and my records.

 

Kindly help me building my scripts because its not working of what I need and expecting

 

I want that in my script that if the user click the PDF button it will show the report layout on top of my original layout. and if the user decides not to continue making the PDF it will close the report layout.

 

Please find my attached file for your reference.

 

Thank you so much.

 

Karenjoy

 

Report.zip

I want that in my script that if the user click the PDF button it will show the report layout on top of my original layout. and if the user decides not to continue making the PDF it will close the report layout.

 

Will this be used on FMGo?  If not, you can open a new window to show the report layout on top of your original layout.  If FMGo, you will need to use one of these three options 1) switch to different layout, 2) use popover or 3) use slider.  I will assume this is for desktop so I'll rewrite your script using new window in my example (see attached file at the bottom of this post).  There are other ways your script can be improved, Karenjoy, so I will include those notes below (and I incorporated them in the new ReportMOD file):

 

Finding: Currently you have three separate find scripts for the three types of containers: Cans, Plastics, Bottles but all you need is one script called Find Containers and pass your selection to the script. Your selection (field called report) should be changed to a global (File > Manage > Database) and select report field then go to Options > Storage. Check 'global storage'. Now that your Report field is global, it can be accessed and used anywhere in your solution even without relationships.

 

Your Cans script finds and omits Bottles then finds and omit Plastics. Is there any reason you are not simply finding Cans? I created a 'Find Containers' script which combines the three scripts into one AND allows you to find more than one item checked and looping if so, creating multiple find requests.

 

If you are not on a layout based upon the table occurrence you are searching, evoke Enter Find Mode[] before switching to that layout. Otherwise, if you switch to a layout first, records will be pre-fetched needlessly when you are going to simply dismiss them to find a new set a records. By entering find before you switch, those records aren't loaded and it is much faster.

 

Developer table: I suggest that you keep your globals in a 'developer' table of one record (maybe called Preferences or Reports). I moved your globals to a Reports table.

 

Preview Mode: Preview mode is only needed if User is viewing the record so I removed that line.

 

Save as PDF: You had it set to save current record but your report is list view. I have changed it to 'Records being browsed' and I have change the layout body size down to a single record so more records can be viewed. If the User does not enter a file name, you might wish for a default name so I've provided one (see Set Variable $fileName line).

 

Please let us know if you have any questions and we'll be more than happy to help you through it.  :-)

ReportMOD.fmp12.zip

  • 2 weeks later...
  • Author

Thanks Laretta, I really appreciate it.

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.