thorgil Posted July 19, 2003 Posted July 19, 2003 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
-Queue- Posted July 19, 2003 Posted July 19, 2003 How do you propose to extract external data without a relationship?
thorgil Posted July 19, 2003 Author Posted July 19, 2003 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
-Queue- Posted July 19, 2003 Posted July 19, 2003 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, "
thorgil Posted July 19, 2003 Author Posted July 19, 2003 A value list in other file create I will. Queue I thank.
thorgil Posted July 19, 2003 Author Posted July 19, 2003 Thanks for the help.... Though as always... it resulted in more questions... Patterncount( calcfield, "
-Queue- Posted July 19, 2003 Posted July 19, 2003 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.
thorgil Posted July 19, 2003 Author Posted July 19, 2003 Yes, it's numeric values. But how do I get the last ValueList Item? /T
Ugo DI LUCA Posted July 19, 2003 Posted July 19, 2003 The simpliest method. Middlewords(yourfield, PatternCount( calcfield, "
-Queue- Posted July 19, 2003 Posted July 19, 2003 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, "
Ugo DI LUCA Posted July 19, 2003 Posted July 19, 2003 Well, I didn't figured it out my own Queue. This is that Aussie's champ idea, you know who I'm refering to Yes, as you added the CR, this one would work.
Recommended Posts
This topic is 8138 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 accountSign in
Already have an account? Sign in here.
Sign In Now