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.

Save as PDF - Background only

Featured Replies

Hi,

 

I am creating a school db and I want to ability to email a record to some colleagues. The send email bit works fine, it attaches a pdf as required to the email prior to sending.

 

The bit that's gone a bit wrong (or maybe not!) is the actual PDF has only got the layour design on there, the data hasn't been added. I'm getting a header and name of the layout and then a blank screen.

 

I've attached my script. Any help / direction is greatly appreciated.

 

Thanks

Ann

post-112258-0-66868100-1421675006_thumb.

looks like the "find matching" is not working as expected.  You probably don't need it because you are switching layouts but stay on the same table; so you'll stay on the same record by default.

How are the tables "TeacherEvaluation_tbl_Subject" and "tbl_TeacherEvaluationForm" related. Perhaps by the teacher's primary id, "__Pk_"?

 

If so, use Go to Related Records, match current record, to jump from one context to the other.

 

I find your table naming convention difficult to follow. You might wish to post a diagram of your tables and how they are related, because having the correct data model is crucial to a successful solution.

  • Author

HI,

Thank you for your help. I've attached a copy of the relationships so you can see how the tables are related.

 

I've got a slide control on the layout I want to save to pdf. Will this cause a problem.

 

Many Thanks
Ann

 

post-112258-0-26311200-1421753207_thumb.

Ann,

 

It looks like you're relating an evaluation form to the subject table incorrectly. I see __fk_Subject = SubjectDescription, rather than __fk_Subject=__pK__

 

 

Also, whenever I have people related to an entity, I use this data model:

 

People>Team<Entity

 

So, in your case, rather than all the separate relationship from the Evaluation Form to Staff, all you'd need is one relationship. The Team table would have the foreign keys for the Evaluation form and the Person, and a RoleID. Create a RoleType table. All you need is RoleID and Description. Then, on the Evaluation form, place a portal to the Team table and allow the user to add Team members and select their role.

 

Back to the original problem:

On what layout is the "Send Evaluation" button. I realize now that I have no idea where you're starting. You want to send a specific evaluation to a teacher, correct? "I want to ability to email a record to some colleagues." Or, are you looking to send all the evaluations that you have for a specific teacher to him?

 

btw, your naming conventions are overly complicated. But, if your comfortable with them, then that's your decision. imho, there is no need to include tbl in a table name.

what is the Table Occurrence that you are on when you start this process?

LOL, Wim. Do you want to take on this one?

 

I'm onsite all day, so that's the last bit of time I have for this. (Wish me luck on External Authentication and a FMS12 server upgrade!).

  • Author

Thanks BCooney. I missed that error.

 

In answer to your questions, the Send Email button is on a layout based on the TeacherEvaluationForm table. It's on the last slide control so once the observer has entered all the information they can then email a copy of it to the teacher they have just evaluated.

 

I only want it to send the current record that they are looking at.

 

Wim, I am on the main table as per the diagram above.

 

Thanks
Ann

Ok, instead of using "find matching records", do the file explicitly by using

 

Enter Find Mode

Set Field <you want to search on> = <what you want to find>

Perform Find

set variable [ $error = get(lasterror) ]

If[ $error <> 0]

  show custom dialog] $error ]

End if

 

I'm pretty sure you'll see that the find request errors out

  • Author

Hi Wim,

 

Thanks for that. The script doesn't seem to be erroring, however, even with the above changes when it creates the pdf it's blank.

 

I check it with another layout and it worked fine. :)

 

The difference in the layouts is I have a slide control on the one that comes out blank and nothing on the other layout.

I think I'll have to create a view layout without the slide control to get it to work, unless there is another way?

 

Thanks for your help. Its greatly appreciated. :laugh2:  :laugh2:

Ann

If you go to a layout with a tab panel or slide control, it will default to the default tab/panel.  So if your stuff is not on that default panel you will need to do a "go to object" to activate the right tab/panel

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.