Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 3940 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a task database and on every record the person's name doing the task is recorded. It used to be a calculation field (first and last name) but i changed it to a auto-enter calculation text field so it can be modifiable. However, I kept the calculation field and here's why.

 

At the end of every month a reported is printed out, using a layout i made. What I want to change is, not have the name be recorded if the it was a weekend, or a holiday. Even though the task is not being done is still has to be logged and a value list with the option "School Holiday" or "Weekend" has to be selected. I created a script to have the name omitted but i think it's sloppy and I'm sure there's a better way to do it. 

 

How i did it was, if they choose either weekend or school holiday, set the auto enter field to blank. Then when a new record is created a script is ran where the auto enter calculation field is filled in with whatever the calculation field is (which is their name). This way the field is always filled in and only blank if the option of Weekend or School Holiday is selected.

 

Is there a better way?

 

Edit: Never mind, the way I did it does not even work. 

Posted

Hello Luis,

   Let me summarize your situation to see if I have it correct:

 

* Users are creating tasks in a system, using layout "ABC"

* Each task created has a user's name and a 'when done' option associated with it

* You are printing a report once a month, and you are (I am guessing) wanting to exclude those tasks that were marked as 'Holiday' or 'Weekend'

 

One question:  does the user always have to select this 'when done' option?  Or do they only have to specify the option if it IS a holiday or weekend?

 

To answer your specific question, there are a few options:

1) a script trigger on the layout object for the drop-down/pop-up selector:  when they pick an option the script reads the selected option and it optionally sets the name field, or doesn't set the name field if the option chosen is Holiday/Weekend.

 

2) Auto-enter calc on the 'Name' field; this calculation would reference the 'When Done' field:

       if ( Table::When_Done = "Holiday" or Table::When_Done = "Weekend" ; "" ; <user's name> )

 

Both techniques will update the name field if the option is later chosen.  One benefit of the auto-enter calc version is that you don't have to remember to configure the layout object with the script trigger, if you happen to create a new layout that shows (and allows edits) to this 'When Done' field.

 

However, I would ask:  what is the idea behind removing the person's name from the record?  Is it so that your report doesn't show the names for these events?  Do you still want to show these events if it is a Holiday/Weekend, or are you trying to hide the events altogether?  If you are trying to hide them altogether from the report, then you could set up a script to create a specific found set, one that excludes entries of Holiday/Weekend, and then show the report.  That would exclude those records from the report.

 

-- J

This topic is 3940 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.