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

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

Recommended Posts

Posted

I have two related databases, A and B. A is my main database and one record from here can be related to many files in B. I can see all the information I need through a portal.

I need to be able to export the most recent "amount" and "date" from B (both on the same record), from the main record in A. If I try to do this from A now, it exports all the related dates and amounts.

The way I proposed to go about this was to create two fields in A that show the most recent date and gift, and then export those fields. But I'm not sure how to write the script(s) to get the most recent record isolated, and then bring that information into A. Make sense?

Thanks for your help!

Posted

Create a layout with a portal in A containing "Date" and "Amount" from B. Sort by "Date" in descending order.

Create calc fields in A that are equal to the related "Date" and "Amount" fields in B. Put those fields in the layout.

When you export, the most recent date info should be exported.

HTH,

Dan

Posted

Thanks for the advice. It worked well and I got the amount I needed, however, the date field did not work. I got an unrecognizable number. Not important, as the amount from the correct date was essential, but though you might be interested. Thanks again!

Dezza

Posted

Filemaker does not STORE dates in human readable format, it stores them as a number.

Make sure that the current layout has the date formatted as you want it and in the Export dialog there is an option to format data using the current layout, select this checkbox.

The other option is to make a calculated TEXT field with the DateToText (DateField) function, which will convert the date number to a MM/DD/YYYY format.

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