Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I know hash() function can be used to make fields of variable length to fixed length but when is the situation to use it ?
In the same situations than AutoNumber(), when you want to uniquely identify the same string across the application but using a fixed length string instead of a variable one (i.e.: street names or full names).
Also when you have a composite key (i.e. concatenating several values from different fields) you have created using several fields to uniquely identify a row in the data model by a smaller/fixed length value.
I never saw the case to use the Hash*() functions, but always the AutoNumber() function instead.
Then as of my understanding, autonumber() and hash () function are the same in giving unique values but autonumber() return integer whereas hash() returns string.. Is this right ?
Hi Pradeep,
actually hash() always returns the same output for the same input. It does not depend on your data in app and their order as it is in case of autonumber(). So you should use autonumber() only in one final app. If you need to generate the same key across applications (for example multi-layer generators) you should use hash().
BR,
Maria
Okay great! thank you