Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Scripting for buttons

Scripting for buttons

Scripting for buttons

At work I've created a form in table layout in FM 7 for ordering lab products in my dept.  My boss wants a button next to each item so that if the docs want to order that product, they can just press the button next to the items and it will automatically be sent to the network printer of the person who does the ordering.  Now in the layout, there's a header with the case#, date, charge and the name of doc who's ordering.  The footer has any comments that the doc wants to add.  So, actually, I need the entire form printed with the items checked off. BTW, my boss says he wants it by this Friday and today is Tuesday!

For several days, I've been trying to figure out how to do this.  I created the button in the layout field, but when I go back to browse or find mode, the button doesn't show.  So, needless to say, even if I put in a script for it to print to my printer, because the button disappears, nothing works.  

Someone please help!!!!

RE: Scripting for buttons

In which part of your layout did you put the button ?

RE: Scripting for buttons

I was trying to put the button right next to the code field. The layout is in table view. Does it matter what view the layout is in?  Should it be in form view?  I put it in layout view because there are approximately 30-40 products the docs must select from and it was just easier to have to have it in this view so that they could see all the products in one glance. (Suggested by my boss seeing that most of the docs that will be using this are not PC friendly) After reading a little while waiting for response, I realized I may just need a check box instead of a radio button.  

RE: Scripting for buttons

With 'part' I mean: header, body, footer.

You're mixing up terms (like 'layout field), so it is hard to find out what's going on here.

When you in 'layout mode', you can see which parts you have on the given layout; header, footer, body, trailing summary etc. Buttons don't worj in every part of a layout. (see help file)

It's not very clear to me why you want to put needed information in a header or footer part.

A radiobutton will give you an 'or' choice, a checkbox will give you a singular or multichoice (return separated list), which is an 'and' choice.

If I understand you well, I would give the user a layout where choices can be made for product, with the possibility for name, date etc.
If there are sub-choice, use a filtered valuelist.
After that the user can click on a button which will trigger the script to summarize all the choices and generate a report (print) that is redirect to a printer.

RE: Scripting for buttons


I need help with the body of the form.  The header is fine; they just fill in pertinent info about who's ordering.  The footer - the same.  However, the ordering items are in the body of the form in a "table" view. I need to put a check box next to each item so the docs can choose which item they need to order.  I can't figure out how to make a check box in FM.

RE: Scripting for buttons

First it's best to have a valuelist linked to a button formatted field.

The valuelist can be a custom made, you fill in the values in: File --> Define --> Valuelist.
Here you have the choices: use values from field (point to a field - the values in that field in the given table will be listed in the valuelist in your table)
use valuelist from another file (seems to be clear)
custom values : your list of items.

As I mentioned above, you format a field as...
In layoutmode, click on the field you want to attach the valuelist to, Format --> Field/Control --> Setup
In this window: Display as --> make our choice from the drop menu, this time Check box --> Display values from: --> make a choice from the valuelists.
Back in layoutmode, make sure the fielddimentions are set to show all the values, and make sure the bordercolor is not set to the background color or you will not see the boxes.

Now this is how to make a checkbox.
The use of a checkbox is another story.
You can use a checkbox to let the user make a choice out of a given list, or just to make a choice, like Yes or No.
If it is the latter, with, f.i. a script that will look at the Yes/No value checked, you can make If() statements an steer the application in every which way you want.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close