March 12, 200619 yr 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
March 12, 200619 yr 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.
March 12, 200619 yr Author 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.
March 13, 200619 yr 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.
Create an account or sign in to comment