Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

using extend in a function

Featured Replies

I have filemaker 5 and I am trying to use extend for a simple function. I have a start number of 245, from that I am trying to subtract values in a repeating field and have the result displayed in a repeating field.

It is set up as remaining(result) = extend(start number)- repeating field (any value)

For the first row it works for the second and third rows I get a negative number.

It doesn't seem to be using the 245 for each calculation.

Am I missing something?????

confused.gif

This is not a Custom Function question; such are available only in FileMaker Developer 7.

I tested this and it works for all repetitions on my system. The calculation is reptest2 = Extend(start_number) - reptest1, where reptest1 and reptest2 are repeating fields.

  • Author

I tried it exactly as you have the calculation and it works for the first row for all others I get negative numbers because it is not using the extend value. I even set one up the same way the user guide has listed for an example and it worked for the first row and not any of the following rows.

This seems silly, since it is such an simple calculation.

Any other suggestions??? confused.gif

Can you stuff and attach a clone of your file?

Yeah, seems very strange to me.

Make sure you're not using a same fieldname but from another file, where its value differs from the one you have in the current file.

That's all I can think of.

  • Author

Here is a copy of my file, there are two trials here.

fish3Copy.zip

First, neither of your calculations is repeating and there are no repeating fields in the file at all. Second, you only have Start Number and Tax Rate entered in one record. There's no way a record will grab the previous record's data using Extend. wink.gif

You're viewing multiple records in a table, not a single record with repeating fields. Change View -> View as Table to View as Form and you'll see the problem more clearly.

  • Author

Well I guess I am totally confused. What is extend used for? The tax rate example was taken from the filemaker guide that explains that using extend allows a calculation to include a non-repeating value in the result for all repetitions of the calculated field. Maybe I am misunderstanding the difference of a repeating field and non repeating field? A field is essentially a column and a repeating field will have several rows of values??

Is it right in front of me, staring at me. Cause I still don't get it.

Thanks for your help.

A repeating field has multiple rows in a single record. What you have is a single field in multiple records.

It sounds as if you're trying to create something that would be much easier to do using a one-to-many relationship anyway. You should do some reading on relationships and how they function.

  • Author

After some tinkering around I understand. I find the filemaker guide misleading sometimes in it's explanation and the help menu has brief descriptions. I ordered some other guides so I will have some more resources. Learning as I go...

I did end up using a relationship and have the results I was looking for.

Thanks! grin.gif

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.