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

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

Recommended Posts

Posted

I have 2 db:

1. Products with dates for different products (hotel room) two layouts list view and form view.

2. Price file have prices for different dates, different years, different rooms.

Products and prices are related with a field called room_prices and the same in price bd like this;

Room&

Posted

You need to create a different relationship, one that will show all of the records if the user hasn't specified anything to filter by but show only matching records when the user has entered a date.

In the local file, create a field called gDateEntry. This field will either be empty or hold the date the user is interested in.

Create a calc field called DateNumber that is simply set to gDateEntry. Give this calc a number result. This is to convert the date entry into its equivelant number value.

Create another field in the local file called DateFilter that has a text result. Set the calculation for this field to the following:

Case(

  IsEmpty( gDate ),

  room_prices & "1",

  room_prices & DateNumber

)

If the user hasn't entered anything into the gDate field, then DateFilter will have a value of 1. Otherwise it will have the numerical equivelant of the date as stored by FileMaker. Dates are just numbers in FileMaker, which is why we can convert it to a number and insert it into a text calc.

Now, in the child file, create a similar DateNumber field which is a calculation with a number result. Set its calculation to PriceDate or whatever your date field for your price database is called.

Create a DateFilter field as a calculation with a text result set to the following:

room_prices & "1

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