Jump to content

multiple find pop up date window


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

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 3 weeks later...

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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