February 24, 201015 yr Newbies I'm trying to return data for a given date range. I have the following setup gDateStart [global date field] gDateEnd [global date field] I declare a local variable called: $DateRange I set the variable as so: SetVariable [$DateRange ; gStartDate&"..."&gEndDate] I then set the field called "Date" to $daterange and preform the find, like so: Enter Find Mode [] Set Field [ Date; $DateRange ] Perform Find [] This works when I run it from my local machine - but when the client runs it in a hosted environment it doesn't seem to assign the date range to the local variable and returns all records. It is very frustrating as I cannot reproduce this at home and I don't have direct access to the clients hosted environment. Any Ideas? Is there a problem in the way I'm using the local Variable as a holder for the date range?
February 25, 201015 yr You don't really need the variable - global fields retain their values in Find mode. But that doesn't seem to be the issue here. How are the globals populated?
February 25, 201015 yr Author Newbies I have a layout called "Report Options" that has the two Globals: StartDate and EndDate that are populated by the user. Each field has a Calender Control attached to help the user select the required date.
February 25, 201015 yr Ask your client to select Records > Modify Last Find and report the contents of the searched date field. Also make sure they are patched up to the latest version (you didn't say what version/s they are using).
February 25, 201015 yr Author Newbies Good point about the version. I believe it is FMP 10 OS is X Snow Leopard. I will try what you suggested regarting the FIND and get them to confirm the version they are running. Thanks for you advice
February 25, 201015 yr Author Newbies I found out what version the client it running it is the same as me. FMP 10v3. It is hard for me to get the client to run the suggested test. Tonight I will make a change to the srcipt and remove the local variable as you said it was not needed (but it does keep things neat) and I'll see if that makes a difference.
February 25, 201015 yr It is hard for me to get the client to run the suggested test. It will be difficult to troubleshoot without getting feedback. But if you can script the find, you should be also able to script the test for them.
March 1, 201015 yr Author Newbies Thanks for your help but I worked it out on the weekend. I thought it was doing this: Enter Find Mode [] Set Field [ Date; $DateRange ] Perform Find [] It was not it was using [iNSERT CALCULATED RESULT] not [sET FIELD] to pass the local variable containing the daterange to the field: [Date] I changed this to [set Field] and it works. Strange why it would work locally and not when hosted. In my limited knowledge of FMP I would think that either should work. Guess I should open my eyes when inspecting my own code - I just assumed it was using [set field]. Thanks again,
Create an account or sign in to comment