Entity Name = Random Number

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ciryaj
    Member
    • Mar 2018
    • 45

    Entity Name = Random Number

    Hello,

    I'm trying to create an entity labled with a random number.

    I was able to use javascript for this task to be done.

    So requirement is:
    1. Name of the entity is a random number - Done
    2. Name must be unique - How do I make sure that the generated number is not repeated? Is there a way for me to validate the generated number?
  • ciryaj
    Member
    • Mar 2018
    • 45

    #2
    anyone?

    Comment

    • tanya
      Senior Member
      • Jun 2014
      • 4308

      #3
      Hello,
      - you can create an index for this and you will get error from database while saving, if name is not unique.
      - you can create a listener on field changing - send a request, try to find a record with this name. If there is such one, regenerate the name

      Comment

      Working...