How I can prevent duplicate records being added?
Ninox Profile

Hi Nick,

I did include the code you sent me (attached screenshots) and I still can enter same date on the next fields of my table without any warning. Any hint?

Captura de pantalla 2018-10-15 a la(s) 8.42.34 p. m.

Captura de pantalla 2018-10-15 a la(s) 8.44.51 p. m.

Ninox Profile

I work with Mac app. Maybe web app is different?

Ninox Profile

I use the web app; seems Ninox does not support this option on web

Ninox Profile

Hi, 

That is right: The alert function does only work on buttons in the web app at the moment, but we are already working on that. Thank you for your patience. 

Best, Jörg

Ninox Profile

Can dialog() be used instead of alert()?

 

i have been playing with dialog(), and it seems to work on the web app.

Ninox Profile

I guess not. I forgot dialog() is only used with buttons.

It looks like the if statement is not executed if it has alert() or dialog().

If you take the alert() out, it will not allow you to add identical dates. There will be no warning, but it is better than the if statement not executing.

 

let myDate := Date;
if cnt(select TableName where Date = myDate) > 1 then
Date := null
end

Ninox Profile

Hi, 

You are right, also this function does only work on buttons in the web app at the moment. We are already working on that too. 

Best, Jörg

P

This concerns me also.  It would be helpful to have a "unique with" field attribute available as a feature rather than needing to hard code the function.  EG Field-A in conjunction with Field-B (and more) must be unique. Scenario (Family-name is UNIQUE WITH Given-name and Date-of-birth).  Means that where those conditions all are true then the entry is rejected.  

Ninox Profile

Unique field is important on web app; hope Ninox will solve this soon

J

Yes I am needing the same solution. Making Inventory Table... Do not want duplicate part #s

 

Reply