Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Number in Text Field


tonyMONK
 Share

Recommended Posts

I have to include a number field, together with other fields in an export layout as text.

 

However, the number must appear with the decimal point as "." not "," but I can't seem to achieve this.

 

The XP system setting is correct and I've set the field format of the number on which the text field is to be based for the decimal point to be "." but I'm not having any luck.

 

Any ideas??

 

Thanks

Link to comment
Share on other sites

Thanks for your prompt reply AHunter3.

 

My situation is fairly simple. The number has and will only ever have 2 decimal places. This is what I have to export, so I don't appear to need to use Truncate. Also, I can't see the reason for the Mod function but I may well be missing something.

 

In my table I have the number field which uses the European form of decimal separator ("," intead of ".") and I have another field which contains the same data as this number field. I have formatted this field to show the separator around the other way, which is the correct export format. But the decimal separator appears in the export (text) as ",". Any ideas why this is so?

 

Isn't there simply a way of substituting the "," for a "." in the export number field?

 

Thanks again for your help.

Link to comment
Share on other sites

You need truncate and mod because you are forcing the decimal demarcator between whole numbers and tenths to be a dot not a comma.

 

That's what you asked for, yes?

 

Gimme the part of the number that's to the left of the demarcator by truncating it there, drop me in a freaking PERIOD not a COMMA thank you very much, then put in the mod (remainder).

 

Isn't there simply a way of substituting the "," for a "." in the export number field?

 

It's not a text field so FileMaker doesn't perceive a "," to exist in the field. You could do it roundabout, doing a GetAsText on the number field then substituting "." for "," on the result, that would also work, yes. But you can't just use Substitute directly on the number field.

Link to comment
Share on other sites

Actually, you may be able to do this without creating any new fields.

 

Set the field format on a layout to use the dot not the comma; then do your export specifying that you want to format the data as per the current layout.

 

Checkbox: "Apply current layout's data formatting to exported data"

Link to comment
Share on other sites

Yes, I've tried your latest suggestion but the export field is actually a composite i.e. several fields being exported within the one shell as tab delimited to import into another program.

 

Even though I set the check box "Apply current layout's data formatting to exported data" the separator still comes out as ",", which is invalid for the import.

 

I was trying your 2nd suggsestion, GetasText the Substitute but I end up with duplicated data in the field i.e. it's appending the data rather than substituting it. Any idea why this might be?

 

I also have to say that the Filemaker help with regard to these functions is scant and leaves a lot to be desired. Any suggestions for a fuller treatment?

 

Mil gracias!

Link to comment
Share on other sites

You aren't supposed to GetAsText the Substitute, you're supposed to Substitute the GetAsText.

 

 

Substitute(GetAsText(Table::Numberfield), ",", ".")

 

Aside from which, did you try my first suggestion? It should be pretty bulletproof.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use