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

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

Recommended Posts

Posted

I have a script that has a multiple find with 4 different records in the find mode. I have a pause at the find mode screen so i can imput the date i want to find on. The problem is, i don't want to have to type in the date (or even cut and paste it) four different times, one on each find mode record. Is there a way to have a "master" pop up window asking what date I want to find and then have it maybe copy and paste the date in each of the four find records that are preset with the other criteria?

Posted

I have had a similar problem, this may not be the best way to solve it, but it works smile.gif" border="0

Create a new global field 'gWantedDate', and a new layout that has only the global field on it. When you pause the script (I will be assuming that you are still in find mode, but even if you aren't this should give you the basic idea) take the user to the new layout and make them fill it in. When the script is resumed you can use something like

Loop

Set Field ( Date , gWantedDate )

Go To Next Request ( Exit On Last )

End Loop

This will copy the Wanted Date into all of the find requests and exit the loop automatically when its done.

Hope this helps.

Posted

Not sure about this. It's not working. I know you said to be in find mode and then go to the global field layout and enter the date and then resume the script and do the loop , but that doesn't make sense because if i resume the script it will do the find before it's set the global field to the criteria. Right? So i changed it to this but it still doesn't work:???

Enter Browse Mode

Go to Layout 1(one with the new global field)

Pause/Resume Script ( so i can enter the date)

Go to Layout 2(one that i'll do my find in)

Enter Find Mode (Restore/pause)

Goto Field (Billing Date)

Loop

Set Field (Billing Date, gBillingDate)

Go to Record Request/Page, (Next, Exit after last)

End Loop

Perform Find

Posted

Never Mind! It works! I forgot to select the option to make the global field a date and it was confused. It works now! Thanks a bunch!!!!!

Posted

Ok my bad, when you described your script I thought everything else was auto entered (the date being the only thing that was manually found.) With the script that you posted, you will probably need to use the command 'Go To First Request' after your 'Find' command. The first bug that I can spot with the current script is that you could already be on the last request when you start the loop so it exits too early.

Hope this helps.

By the way...if you are using 'Find(Restore)' then why are you going to the layout to perform the find?

  • 3 weeks later...
Posted

Hope you guys are still there... I have a new problem. I have to do a RANGE find for that date. And, for some reason my global date field won't accept a date range find - where you enter 00/00/00...00/00/00. It normally works but not in the global field. I tried making the global field a text field but then all my other date fields have to be text, which i don't want. Any suggestions?

Posted

Use 2 globals, _dateStart, _dateEnd. Use Insert Calculated Result[_dateStart & "..." & _dateEnd] to put the range into the searchable date fields. Note that you can't use Set Field for this, because a range is not a valid date.

Posted

well, i did what you said but it still says that the field isn't a valid date. and it pauses at the pasting of the date range but instead of the dates i entered (01/01/01...10/01/01) it has some other numbers. I have both the globals (_dateStart and _dateEnd) set as global date fields and put the Insert Calculated result where i hadthe Set Field. ANything else i missed?

Posted

Sorry, my fault. I forgot the vital bits:

DateToText( _dateStart ) & "..." & DateToText( _dateEnd )

Even though you are pasting into a date field, the range is text.

FileMaker stores dates as integers. Jan 1, 0001 is 1. Jan 1, 2001 is 730486. If you don't use the DateToText() function, 01/01/01...10/01/01 looks like this: 730486...730759, which is definitely not a valid date or date range.

Sorry for the confusion.

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