Write to text file using different types

I am writing to a text file, but experiencing difficulties as I need to send 2 different data types(Text + Decimal). I have got around this by using Textfile.Write(‘text’+FORMAT(decimal)); This is creating additional problems as I need to keep the decimal field length. i.e. if the value is 4.00 then the FORMAT command is changing this to 4. I have thought of using the PADSTR command but I do not know if this can deal with decimal places. Any Suggestions ??

Using the format command is the right way to go. You just need some more arguments passed along. Consult the online help for the FORMAT command. So try something like: FORMAT(Decimal,0,’<Precision,2><Comma,.>’)); This should do the trick, just remember set the desired precision. Best regards Soren Nielsen, moderator Navision OnLine User Group Edited by - SNielsen on 2001 Mar 19 14:11:57

Soren: Please could you expand on your reply. I cannot find reference to precision sign etc. in the help file

In the online help for C/Side choose FORMAT (good work Sherlock :-). And then scroll down a little, there should be a hyperlink to “Format” property in the FormatString section. In this document is listed the different <> tags you can use with the FORMAT command Best regards, Soren Nielsen, moderator Navision Online User Group Edited by - SNielsen on 2001 Mar 19 16:48:04

Soren: I had already done that, but it did not immediately make sense. Maybe I jumped the gun a little?? Thanks for your help, it now works fine.!