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 Children