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

Date Range Find works on local machine but not on Hosted machine


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

Recommended Posts

  • Newbies
Posted

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?

Posted

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?

  • Newbies
Posted

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.

Posted

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).

  • Newbies
Posted

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

  • Newbies
Posted

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.

Posted

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.

  • Newbies
Posted

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,

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