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.

Calculated result in the same field?

Featured Replies

  • Newbies

Hello,

I have a long text fields that's been calculating a lot of things and put them in one large text field to be exported. I want to calculate the lines of the text field with ValueCount function but I want the result to be in the same field as the one it's calculating. I tried to create a different field, which I got the number of lines, but when I try to insert that field in this long field, it shows a "?" and doesn't show up anything else in the field.

Does anyone know how to calculate the number of lines in a long text field and put the resulting number in the same field it's calculating?

Hope this is clear. Thanks anyone for assisting in advance!

You kind of lost me here:

11 hours ago, MA3 said:

I have a long text fields that's been calculating a lot of things

A text field does not calculate anything. If you want a calculation field that combines several text fields AND appends a line count of the result, you could do something like:

Let ( 
text = List ( Field A ; Field B ; Field C )
;
List ( text ; ValueCount ( text ) )
)

 

There is a way to add the line count to an existing text field by auto-entering a calculated value =

List ( Self ; ValueCount ( Self ) )

but this becomes problematic if you edit the field.

 

  • Author
  • Newbies

Well, I am trying to generate EDI files from our database. Now I know that sounds scary and people might say we will need to hire a programmer or something to do that, but I work for a non-profit and we just don't have the budget to do that. I am a little familiar with FileMaker and for past few weeks I have been looking at our payer's requirements and I see that once I am able to set up the system, the changes are minimal and we should be able to create those files.

So that's the reason I created one text field that combines a bunch of fields from everywhere in the database so that I can generate EDI txt files. But in one of the segments inside the EDI's file, it's asking for the number of lines in the document, so that would be the number of lines in the field that it's calculating.

19 minutes ago, MA3 said:

I am trying to generate EDI files from our database.

I am afraid that's a little too generic. Anyway, I think you have the answer: calculate the lines first, then return the lines and the number of lines.

--
P.S. My preference would be the export the raw data as XML and use a custom XSLT stylesheet to transform it into the desired EDI format. That way there is no need to burden the file's schema with elements that serve someone else. But it requires a basic knowledge of XSLT. 

  • Author
  • Newbies

Sorry about that, I could've explained this better but your answer worked for me great. Thank you so much!

I don't know anything about XSLT, but will try to google it and see if I can get anywhere that way.

Thanks again!

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.