avoid insert duplicate information to database and give a hint to the user

Sorry, i keep looking for ways to not let user insert duplicate username to the database, but always fails, i know primary key as username can't be repeatedly insert in to the database by its service, but i just want

to give user a hint, and tell him can't register same username others used before and let it not to update to the back end database by its smartservice, then how can I do?

{

label: "Insert",
saveInto:(
a!writeToDataStoreEntity(
dataStoreEntity: cons!usernameConstant,
valueToStore:(ri!username)
),
),

submit: if(ri!username.username in local!rule.username
,false,true),
style: "PRIMARY",

}      OR

label: "Insert",

saveInto:(

if(

ri!username.username in local!rule.username,

{},
a!writeToDataStoreEntity(
dataStoreEntity: cons!usernameConstant,
valueToStore:(ri!username)

)
),
),

submit: true,
style: "PRIMARY",

  Discussion posts and replies are publicly visible

Parents Reply
  • I am going to create a back end system, but have to be without any duplicate primary key insert into, or for registration the user will not figure out. The question only for row of 52 to 67, i tried multiple ways not let back end update any function for duplicate primary key been inserted, and let user know he have to choose a different one. But know the error report as "Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function 'if' [line 64]: Invalid number of parameters, function 'if' requires an odd number of parameters, passed 4.". I still have no idea what is the mistake. 

Children