Data of a field suddenly turns to NULL

Questions, answers, tips and ideas on Servoy Client

Data of a field suddenly turns to NULL

Postby palacio » Sat May 27, 2017 12:19 am

Hi!

I would like to ask if there's a bug in Servoy 5.2 that suddenly turns a value of field into NULL. FYI this field
is automatically generated by our program before it goes to the next steps,
We are experiencing it in our software and I already checked all things , all the forms all the modules that
this field was used and I can't find the where we programmers wrote a bad code. I was looking for human error
but I didn't found anything.

Do these things happen when you lock a record?
We have tried also cleaning the java cache and deleting the folder ".servoy" for every user that had this problem.

Hope that someone had already experienced this anomaly.

Best regards.
palacio
 
Posts: 24
Joined: Tue Aug 18, 2015 12:29 pm

Re: Data of a field suddenly turns to NULL

Postby jcompagner » Mon May 29, 2017 11:55 am

are you doing find/search over those tables?
and then maybe don't check it the foundset is really getting into find?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7978
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Data of a field suddenly turns to NULL

Postby palacio » Fri Jun 02, 2017 10:23 am

jcompagner wrote:are you doing find/search over those tables?
and then maybe don't check it the foundset is really getting into find?


Yes, I saw that sometimes to beat the deadline we forget to analyze our codes better
we often use :

Code: Select all
controller.find();
    field = "somethonhing"
controller.search()


also with foundset , so you are saying that this is the cause of our problem ?

I also notice that sometimes we use a relation of form like this:

form.nameOFform.relation_to_relation

shouldn't it be like this :

form.nameOFform.foundset.relation_to_relation


palacio
palacio
 
Posts: 24
Joined: Tue Aug 18, 2015 12:29 pm

Re: Data of a field suddenly turns to NULL

Postby jcompagner » Fri Jun 02, 2017 10:50 am

you should always test if something really goes into find:

if (controller.find()) {
}
else {
}

that relation lookup is the same, its more that you always should know which record to do it on so

record.relation

but the form.relation or form.foundset.relation just means selected record. So if you are sure that that is the one you want then both should be fine
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7978
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 2 guests

cron