Jump to content

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

Recommended Posts

Posted

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

Posted

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

Posted

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, "

Posted

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.

Posted

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, "

Posted

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.

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