Is it possible to have an entity primary field as an auto generated unique ID??
I know [=Helper.GetUniqueString()] can be used in a rule with an action to create an entity but is it possible to do it from the customer search screen?
You can use {RANDOM:X} to generate unique random number. I will explain in a bit.
Is it possible to have these sequential by using number generators?
Probably need to do a different method if you want it sequential. Let me think about it a bit I will get back with you.
It does not have to be sequential, I just thought although very unlikely, It would be possible for {RANDOM:X} to generate the same number twice.
Well our problem is that I dont think we can do what you want from the screen. It can be done via automation. I was wrong thinking we could insert a tag for Default Value.
If you set it up with a decent number of characters it would probably be more possible for your computer to grow hands and slap you with a trout ![]()
You could create your own Customer Search Screen using Label Widget, Editor Widgets etc. It would be complex and probably not worth doing however.
The API would help with this.
api.EntityType(name).Create(entityName,[defaultStates])
api.EntityType(name).Entities().State(name).Update(value);
api.EntityType(name).Exists();
api.EntityType(name).Fields(name).Exists();
api.EntityType(name).Fields(name).FindEntityName(searchValue);
api.EntityType(name).Fields(name).Create(fieldtype,[format],[valuesource],[hidden]);
api.Entity(name).State(name).Update(state);
api.Entity(name).State(name).Get();
api.Entity(name).Data(name).Update(value);
api.Entity(name).Data(name).Get();
api.Entity(name).Exists();
api.Entity(name).Create(entityTypeName);
Yes thats what i thought. I know it may never happen but in 10 or even 20 years time for example the risk of a duplicate increases so I want to do it correctly from the start. Is it possible to use the default entity Id as the primary field? It makes more sense to me to use this rather than a name or phone number
I’m experiencing similar problems in that I need a primary field that isn’t a name, email or phone. Did you manage to find a solution to this?
I did booking number using a {RANDOM:xxxxx} expression but I was creating the entity in an automation flow rather than on an entity screen.
Some use a string constructed using date expression.
I think I am being thick. Where do I put RANDOM:xxxxxxxxx to make it appear?
As I said I created my entities with automation and [?prompts] where the entity creation was automated then fields updated using actions with [?prompts]
Not 100% sure if your planning to use on entity screen…
Can u explain how to do it?