How to check if an Entity Exists from a rule

Is it possible to check if an entity exists, and then if it does run these actions, and if it doesnt run these actions?

https://sambapos.com/wiki/doku.php?id=jscript_api

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);

No… I mean, I would like to be able to enter an ID in a numberpad and if the entiy exists, add it to the order. If it doesnt bring up a screen Ive already made to create the entitty

Well you didn’t say that so I showed you one method. Before I answer again can you explain more what you want?

Sorry What I meant was that I scan a membeer ID, and then if the entity doesnt exist already it moves onto a different action which will have a popup to enter the new memebrs detials in. Ive got the popup working and all, but am not sure how to go about putting a constraint to check if the entity already exists.