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

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

Recommended Posts

Posted

I am writing in FM 4.0v1 a continuity welder log. Each file has a date that each welder was qualified and another date for requalifying. I have a layout for enter the criteria date and a find script attached to a button. The criteria date field is a global field and I have use the set field date to enter this date in the five requalifying fields. I want to enter the equal to or less than symbol in the criteria field but cannot figure out how to input this into a script. The requlifying date could be five different date and I want to see only the date or dates that match the criteria. Any help will be greatly appreciated.

Thanks

Lionel

Posted

Use quotes in Set Field phrase, like "< 1/1/2000". You can also Insert Calculated Result into that global, but make sure the global is a date field

Posted

Hi bbaliner

I have tried the quotation marks and get the message " no record match". I must be going something incorrect. The script looks like this.

Set Field ["Date",""<=Date"]

is this correct?

if not, how do you get only one set of quotation marks in a set field using specify field.

thanks

lionel

Posted

oilman,

I'm having this same problem with one of my solutions. If someone has a better solution that mine, please speak up. I'm all ears.

The problem with using Set Field for this solution is that it wants to enter only dates in your date field. When you enter the text "<=" before your date, it gets confused. The solution to this is to use Insert Calculated Result instead of Set Field. Also, I am working under the assumption that your global field (criteria date) is set to display dates.

You need to use the Insert Calculated Result field to insert this calc into each of the date fields you want to search on.

"<=" & DatetoText(Criteria Date)

Posted

PS: Just make sure your script first goes to a layout that has all these fields on it before using the Insert Calculated Result step. It won't work if the fields aren't on the current layout.

Posted

I guess I'm nor really understanding you.

If you need to find a specific date, you can just create a Find script, and save the settings.

1. First, do whatever search you need in the find mode.

2. Then Script Maker->Create Script. This will give you default script statements, with your search criteria already saved by FM. Delete the two Print statements.

3. Now if you run the script, it will always remember your search criteria.

Hole this helps

Posted

Hi Bbaliner

Hope I can explain this better than i have been.

I have five dates on the same layout that refelcts the requalifying dates for that welder. These days may or may not be the same (Ex. 08/10/02, 10/20/02).

I am trying to find the dates before the welders qualification expires by letting someone input a date in an layout and preform a find on such date. The criteria will be (less than or equal to). The search will not be done for a specific date.

So an operator will need to be inputed. I do not want to do five manual searches.

Script that I have sofars read like this:

Go to layout

Enter find mode[]

Set field["date","date"]But when i add an operator here, double quotation marks

appears.

Thanks for the help.

Bbaliner

Posted

OK - here's my $0.02 worth...

You can't use SetField with "<=" &Date becase the set field step needs to produce something that is a date format to put into a date field, and the "<=" violates this. You should use:

Insert Calculated Result[Date,"<="&DateToText(Search Date)]

BUT - you are using FMP 4.01 and Insert Calculated Result didn't come in until v 5 - so you need to use the Paste Result step instead.

Your script should look like:

Go To Layout (a layout with the date field on it)

Enter Find Mode []

Paste Result[Date,"<="&DateToText(Search Date)]

Perform Find []

Go To Layout (Original Layout)

Make sure that you do not select any of the tick options for restoring find parameters in both of the find script steps.

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