Jump to content

Formula


Recommended Posts

Use the INTEGER function. INT(#) returns just the integer part of the number. Then you just add 1. But first you need to compare the number to INT(number) to make sure they aren't the same and only use int(#)+1 when you need it...

Hope that makes sense.

Anyway this formula in a worksheet database should work:

=IF((LENGTH=INT(LENGTH)), LENGTH, INT(LENGTH)+1)

hth

michaelk

Link to comment

They are in the Vectorscript documentation. Check out the Vectorscript Language Guide, Expressions, Arithmetic Operators.

The others are the usual, +, -, *, / for add, subtract, multiply and divide.

^ is used for exponentiation.

While you are there you probably want to chek out the Comparison and Logical Operators also.

Link to comment

All the cells in a database must be connected to a record field if you want to do data entry. If you only want a formula in the cell it does not have to have a field.

If this is for something like a door, there are fields in the PIO labeled something like User Field 1 to User Field 10. In this case the formula would be ='Door'.'UserFld1'.

If this is for objects that don't have user fields, you will need to create a record (let's call it MyRecord) with a field (MyTextField1). Make sure the field is defined as a Text field if you want to do random characters. Attach the new record format to every object (via the Data tab of the Object Info Palette) that you want to be able to enter the text for.

The formula will then be: ='MyRecord'.'MyTextField1'

Feel free to substitute whatever record and field names you want. If you have spaces in the names you will need to include the quote marks.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...