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.

Small quick question about calculation

Featured Replies

I'm lost in the help files...can't find the right function (or method)...

How do I do i get All the values of a field from an external file without a relationship?.

I wanna do stuff like finding the next value in external_field that is bigger than value x.

/Tobias

How do you propose to extract external data without a relationship?

  • Author

Well, I dunno. Thats why I am asking.

Something like:

getfielddata(dbase,field)

(I know thats not the name of the function but thats what I want to do.)

The reason is:

I don't store any data in my "main" file.

I have a current_id field in the main file and the relations to other files depend on this.

I want to change the value of this (by scripts) but only to values that exist in a field(all rows) of another file.

Problem is I can't find a way to check if a value exists in the other file.

I want to do this without changing the other file at all.

( I come from SQL so my logic is not really FM logic)

/T

Would you be averse to creating a value list in your other files that's defined by the field for which you are searching? If not, you could then create a calculation field in your master file that uses the ValueListItems( externaldb, externalValueListName) (unindexed so it will auto-update) function, and run a script to do a Patterncount( calcfield, "

  • Author

A value list in other file create I will.

Queue I thank.

  • Author

Thanks for the help....

Though as always... it resulted in more questions...

Patterncount( calcfield, "

Ah, yes, it was too early in the morning/late at night for me. I forgot that little detail. Sorry about that, but glad you were quick enough to pick up on that yourself.

If your valuelist is based on a numeric field, then ValueListItems gives you the sorted index of that field, i.e. the maximum value SHOULD be equal to the final value in the field, I would think. If your value is not numeric, then I'm not quite sure what you mean by maximum value.

  • Author

Yes, it's numeric values.

But how do I get the last ValueList Item?

/T

The simpliest method.

Middlewords(yourfield, PatternCount( calcfield, "

I knew there was an easier way, just didn't take the time to figure it out. Although in this case I think it would be MiddleWords( calcfield, PatternCount( calcfield, "

Well,

I didn't figured it out my own Queue. This is that Aussie's champ idea, you know who I'm refering to wink.gif

Yes, as you added the CR, this one would work.

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.