October 25, 200124 yr 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!
October 26, 200124 yr 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
October 26, 200124 yr Author 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
October 26, 200124 yr 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.
Create an account or sign in to comment