onrecord event that creates a field

Grid fields icons, text showing with red border vs no border.

[ATTACH=CONFIG]n77704[/ATTACH]

I have an onrecord event that created a field automatically, I created another onrecord event and it did not create a field. The field “visit” with the icon that has a red border is the item. The syntax is the same. Why did the second event I created not produce a usable field?

sc_fields.png

Hi NoAlias,
Could you post the exact code you are using in the events?

Two things jump to mined to try - I do not think they are high probability to fix but blindly looking for clues. I have not seen SC give a field a red shadow like that:

  1. The field named ‘visit’ - maybe there is a conflict if some kind using that as a field name? I don;t think it is a database reserved word, but who knows? Maybe try a modified name?
  2. Try changing the order of the code. Presumably it makes a field the same way first then does not the second time? Chnage order and see if that makes a difference?

Is this SC 8.1 or 9?

Peace,
Jamie

I still don’t know what happened here, but when I logged out of the development tool, and restarted the Apache service, logged back in and it was all there again. I am however having other issues that are not explainable. These gems just popped up this morning. Now I’m getting random ‘Undefined Variable’ errors when I run the application when the variables are in fact defined. The screenshots from SQL query, onRecord Event and the corresponding error message. Any ideas?

SQL query

[ATTACH=CONFIG]n77955[/ATTACH]

onRecord Event:
[ATTACH=CONFIG]n77954[/ATTACH]

Error:
[ATTACH=CONFIG]n77956[/ATTACH]

onrecord_event.png

sql_query.png

undefined.png

Hi NoAlias,
I think it is possibly confused by the {table.column}, as it must only be creating the {column} field from it.
Try changing:

[ATTACH=CONFIG]n77954[/ATTACH]

to

{legalsitus} = 'Legal: ’ . {pd_legaldescr] …

BTW, I worked with a Planning Commission for many many years and did a lot of work with parcel maps and stuff. Mainly in GIS. What kinda of system are you working on?
Peace,
Jamie

Thanks, that worked. The problem is with the inconsistencies. Some times it throws errors without the table.column and other times it only wants the column. Annoying.

t’s an app that tracks tax delinquent properties that are set to go to auction.

Glad it helped. Application sounds cool. I wish you success,
Jamie