Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I need to sort/find the following set of records:

Current Year and Graphic Liasons (SB and TA) with hours over 10.

This is what I have so far but it doesn't work!

Go to Layout ["MM-GD Reports"]

Enter Find Mode []

Insert Text [select, "Graphics Liason", "TA"]

Perform Find, [Replace Found Set]

Enter Find Mode[]

Insert Text [select, "Graphics Liason", "SB"]

Perform Find, [Extend Found Set]

Enter Find Mode[]

Insert Calculated Result [select, "Last Action Date", "DateToText( Date( 1, 1, Year(Status(CurrentDate)) ) ) & "..." & DateToText( Date( 12, 31, Year(Status(CurrentDate)) ) )"]

Perform Find [Constrain Found Set]

Enter Find Mode[]

Insert Calculated Result ["Des Time Sum>=11 or Est time Task Sum>=11"]

Perform Find [Constrain Found Set]

How can I make this work!!!

Posted

i would make this a find with two requests:

Enter Find - Graphics Liason - "TA", current year (your calculation looks ok as long as the last action date is on the layout you are finding on - and then New Request (or duplicate request) and change Graphics Liason = "SB"

Now you have the problem of the "DES>=11" and the Est Time Task - one of these could be put in the find but not both easily - i would consider finding the records that you have and then making a loop to omit the records you don't need - you need some subscripts to do it because filemaker only stores one sort order, but without really thinking too hard, that would be a way that works.

the subscript would look something like this...

- Sort DES (Descending)

- Go to first record

Loop

If DES <11

Omit mutiple (999999)

endif

go to record (next) exit after last

endloop

then you would have to sort in the main script the way you wanted the remainder to be viewed.

Posted

You only need to do one find. Try the following:

Go to Layout ["MM-GD Reports"]

Enter Find Mode []

Insert Calculated Result [select, "Last Action Date", "DateToText( Date( 1, 1, Year(Status(CurrentDate)) ) ) & "..." & DateToText( Date( 12, 31, Year(Status(CurrentDate)) ) )"]

Insert Text [select, "Graphics Liason", "TA"]

Insert Calculated Result ["Des Time Sum>=11"]

New Request

Insert Calculated Result [select, "Last Action Date", "DateToText( Date( 1, 1, Year(Status(CurrentDate)) ) ) & "..." & DateToText( Date( 12, 31, Year(Status(CurrentDate)) ) )"]

Insert Text [select, "Graphics Liason", "TA"]

Insert Calculated Result ["Est time Task Sum>=11"]

New Request

Insert Calculated Result [select, "Last Action Date", "DateToText( Date( 1, 1, Year(Status(CurrentDate)) ) ) & "..." & DateToText( Date( 12, 31, Year(Status(CurrentDate)) ) )"]

Insert Text [select, "Graphics Liason", "SB"]

Insert Calculated Result ["Des Time Sum>=11"]

New Request

Insert Calculated Result [select, "Last Action Date", "DateToText( Date( 1, 1, Year(Status(CurrentDate)) ) ) & "..." & DateToText( Date( 12, 31, Year(Status(CurrentDate)) ) )"]

Insert Text [select, "Graphics Liason", "SB"]

Insert Calculated Result ["Est time Task Sum>=11"]

Perform Find

The New Requests are the equilavent of a logical OR.

Posted

WoW! I thought you had it there!! I tried it and it came up with no records match that request. I'm wondering, I only had the option of New Record/Request - is that ok? And although the records MUST be for this year and MUST be EITHER "TA" or "SB" they can be either >=11 in "Des Time Sum" OR "Est Time Task Sum" but the hours don't have to be >=11 in both. Maybe that is why I didn't get any results. Thank you soo much, anyway and if you know how to fix it that would be GREAT!!!!!!!!!

Posted

How do your Insert Calculated Result steps appear in ScriptMaker? They should look something like Insert Calculated Result [select, "fieldname", "">=11""]. And yes, New Record/Request is the correct step, although you could simplify it a bit by using Duplicate Record/Request and nullifying the field that isn't being used. Are all the fields to be entered on the current layout?

Posted

Yes they are all on the layout page. I changed the calculated result to include the "select,... but it isn't working. But I also changed it to this: Select, "Des time Sum>=11 or Est Time Task Sum>=11" thinking I would save myself some steps. Still yielding no records. This is so complicated!!! If you have any other advice that would be great. I'll have to check back tomorrow or e-mail me at [email protected] - Thanks again.

P.S. Is Queue at all a reference to "Q" in Startrek?

Posted

The fieldname shouldn't be part of the specified calculation. You specify the field by itself, then the calculation ">=11". Otherwise, you insert, for example, "Des time Sum>=11" in whatever field the cursor happens to be in at the moment. That's why I clarified what the script step should look like in ScriptMaker. There are commas between each portion of the step. You wouldn't want "Des time Sum>=11" even to be set in the correct field, unless you had text with that in it.

It's an allusion to Star Trek, but mostly to Quentin Tarantino, my doppelganger. I got a free drink once because the bartender was convinced I was Quentin. Of course, this was back when I had much shorter hair. I got so used to being called Quentin or QT or Q that I decided to use it as an alter ego for my one man band name. grin.gif

Posted

Trimming Ralph's script a bit...

Go to Layout ["MM-GD Reports"]

Enter Find Mode []

Insert Calculated Result [Last Action Date, "DateToText( Date( 1, 1, Year(Status(CurrentDate)) ) ) & "..." & DateToText( Date( 12, 31, Year(Status(CurrentDate)) ) )"]

Set Field [Graphics Liason, "TA"]

Insert Calculated Result [Des Time Sum, ">=11"]

Duplicate Record/Request

Set Field [Graphics Liason, "SB"]

Duplicate Record/Request

Set Field [Des Time Sum, ""]

Insert Calculated Result [Est time Task Sum, ">=11"]

Duplicate Record/Request

Set Field [Graphics Liason, "TA"]

Perform Find [ ]

Posted

I wasn't very careful when I copied the original script steps.

Insert Calculated Result ["Des Time Sum>=11"] should be

Insert Calculated Result ["Des Time Sum", ">=11"]

and

Insert Calculated Result ["Est time Task Sum>=11"] should be

Insert Calculated Result ["Est time Task Sum", ">=11"]

This topic is 7483 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.