K1200 Posted March 12, 2006 Posted March 12, 2006 I've been trying to implement an inventory export that has a user-entered delimiter text field on the end of each record. I placed the delimiter text in a global, but it shows up on the first record only. I would appreciate it if someone can explain why that is so -- and suggest another approach. (I certainly thought a global would work.) Thanks ExportProblem.fp7.ZIP
Fenton Posted March 12, 2006 Posted March 12, 2006 It's the layout. When you export from the parent record, it exports the line items as related records. But it only exports the parent data once. If you go to the Items layout and export, it puts the delimiter on each line. I tried creating another TO of Sys, X relationship, hanging off the Items TO, and used that for the delimiter. But it still only exported it once from the parent table layout. Which seems a little odd to me. This is a "context" thing. It's saying, from here there's only one, so you're only getting one.
K1200 Posted March 12, 2006 Author Posted March 12, 2006 Thanks Daniele. That's exactly the result I was looking for. Just to help me understand what is involved in the GTTR script step, I changed the ExportDelimiter back to being a normal field (from being a global one) and your solution still works fine. I had tried a second TO like Fenton tried, but when it didn't work the first time I abandoned that path of investigation due to "rising complexity". Also like Fenton, I'm curious about why the global doesn't work. In the conflict between "it's in every record" and "there's only one", the latter case won out. Anyway, thanks very much for the solution.
Fenton Posted March 13, 2006 Posted March 13, 2006 The Go To Related Record goes to the records of the relationship. What I think we're seeing is that Filemaker evaluates each field in the export from the parent records. We may assume that because FileMaker is looking "thru" the items table, in my example of another TO for system hanging off of Items, that it will use the records of Items (ie., the portal) to determine how many instances of the delimiter field. But it is not. It more or less going directly to that final TO, and using its number of records. There's only 1 record, hence only one instance of delimiter. What you see in the portal is a bit of an "illusion", simply because all the records match a Cartesian relationship. I guess this is one of those times when the old "create a related calculation field" would still be useful. If you create a calculation field in Items, = System::Delimiter, it will export in each line. Or, as Daniele did, export from the Items. That would be the preferred method, if it can be done.
Recommended Posts
This topic is 6831 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