Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ascii char specifically nul

Featured Replies

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

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.

  • Author

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

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.

  • 1 month later...
  • Newbies

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!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.