scittneh Posted April 8, 2008 Share Posted April 8, 2008 Hello Hopefully someone can help with my question. I have a negative number that i need to change to a positive number. ie. -3 needs to read as 3 is this possible? thanks in advance. Quote Link to comment Share on other sites More sharing options...
aaa Posted April 8, 2008 Share Posted April 8, 2008 Hi, scittneh! Find records with negative numbers. Then use menu Records/Replase contents/Specify ......... Quote Link to comment Share on other sites More sharing options...
scittneh Posted April 8, 2008 Author Share Posted April 8, 2008 sorry, i should have said. this needs to part of a script. Quote Link to comment Share on other sites More sharing options...
sujat Posted April 8, 2008 Share Posted April 8, 2008 Use Abs function. It removes the negative sign. Quote Link to comment Share on other sites More sharing options...
doughemi Posted April 8, 2008 Share Posted April 8, 2008 Use the Abs[number] function. The Absolute value of a number is always positive, whether the number is positive or negative. If you want to do it on only one record at a time, your script should loop through the records and you would have a script step of Set Field[myNumberField;Abs[myNumberField]] If you want to convert a whole batch of records at once, perform a find to find the relevant records, and use Replace Field Contents [myNumberField;Abs[myNumberField]] EDIT:To use Replace Field Contents[], the field must be on the current layout Doug Quote Link to comment Share on other sites More sharing options...
Ender Posted April 8, 2008 Share Posted April 8, 2008 Use the Abs[number] function. The Absolute value of a number is always positive, whether the number is positive or negative. If you want to do it on only one record at a time, your script should loop through the records and you would have a script step of Set Field[myNumberField;Abs[myNumberField]] If you want to convert a whole batch of records at once, perform a find to find the relevant records, and use Replace Field Contents [myNumberField;Abs[myNumberField]] EDIT:To use Replace Field Contents[], the field must be on the current layout Doug Sorry to nit-pick, but use parens instead of square brackets for a function call: abs(myNumberField) Quote Link to comment Share on other sites More sharing options...
scittneh Posted April 8, 2008 Author Share Posted April 8, 2008 splendid, thanks for the help people. Quote Link to comment Share on other sites More sharing options...
doughemi Posted April 8, 2008 Share Posted April 8, 2008 Sorry to nit-pick, but use parens instead of square brackets for a function call: abs(myNumberField) Thanks, Ender. I apologize for the brain cramp. --Doug Quote Link to comment Share on other sites More sharing options...
David Head Posted April 9, 2008 Share Posted April 9, 2008 EDIT:To use Replace Field Contents[], the field must be on the current layout Not since version 7 it doesn't. smiley-wink Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.