RPCia Posted September 1, 2011 Posted September 1, 2011 Hello, I am trying to match a dat file that one of our main suppliers is requiring us to export The last line in this img is what I have now from filemaker the rest are what I am trying to mimic, I uploaded an screenshot here http://db.tt/Mq4Fc9f This is my field definition for every record: Let( [ m = Month( date ); m = If( Length( m ) = 1; "0"; "" ) & m; d = Day( date ); d = If( Length( d ) = 1; "0"; "" ) & d; y = Year( date ); y = If( Length( y ) = 4; Right( y; 2 ); y); rid = "*" & rollID & "*"; r = rollID & space( 20 - Length( rollID ) ); po = m & d & y & space( 20 - Length( m & d & y ) ); dte = If( Length( date ) < 10; "0" & date; date ) & space( 10 - Length( date ) ) ]; "123456" & space( 6 ) & //scanner serial Number "111" & space( 1 ) & //site code "PHY" & " " & //Transaction code dte & " " & //date of scan space( 12 ) & " " & //delivery number po & " " & //po number space( 20 ) & " " & //physical ID space( 18 ) & " " & //material Number r //roll id & "" ) /* Field Start (1 based) Length Notes Scanner Serial Number 1 12 Site Code 14 3 Transaction Code 18 3 Transaction Date 22 10 Delivery Number 34 12 Po Number 47 20 Physical Id 68 20 Material 89 18 Product Id 108 20 */ ok now I have tried replacing the spaces in between each field with char(0) to get the nul character that does not work. I have tried placing char( 12 ) at the end after the roll id that did not work it simply displays as shown above never showing the appropriate characters. I have confirmed by copying his FF into the data viewr and using the code function it does return 12 and the nul returns 0 I have tried exporting as tab and mer files with encoding set to ansi, aschii, utf-8, utf-16 Why can I not export char(0) as nul and char(12) as FF, can it be done? Before I spend more time on this I was hoping someone would have an answer or flat out tell me it can not be done. Thanks
comment Posted September 1, 2011 Posted September 1, 2011 it may be possible, but not the way you are going at it. Filemaker's Char ( 0 ) returns an empty string. If you want the NULL character, you''ll need to copy it elsewhere and paste it into a global field. Char ( 12 ) should work fine for producing the FORM FEED character.
RPCia Posted September 1, 2011 Author Posted September 1, 2011 Any suggestions on which export options to use, because i tried pasting the null character into the field definition and it did not work either. I also tried using the char (12) and exporting but it does not come through as the FF character. I have not tried setting it into a global field would Filemaker see this differently then simply pasting the null character into the field definition box directly? Thanks for your help
comment Posted September 1, 2011 Posted September 1, 2011 which export options to use, I think you want to export as tab-delimited, exporting only the one calc field. i tried pasting the null character into the field definition I wouldn't try that, as it may easily crash Filemaker.
Newbies exizldelfuego Posted October 19, 2011 Newbies Posted October 19, 2011 We just came across the null issue in a client’s system. In our case, we want to strip out any null characters because it’s screwing up some exported files used in other apps. We created a new table called null with one field called null and one record. The null field, as you might guess, stores the pasted in null value. Then we have a script which runs immediately on login which hops over to the null layout and stores the null value in a $$null global variable so it can be used anywhere, then takes the user back to the proper initial layout. Substitute ( table::field ; $$null ; "" ) works like a charm!
Recommended Posts
This topic is 5051 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