Variable Type specifications messing with script logic?

Lexle
Tera Contributor

Hello, I have a client and includes script that is supposed to auto-fill a field based on specific criteria and using alerts I see my code seems to be working as expected. The variable though, is not filling in on the form when I go to test. The only thing I can think of that would cause this is the type specifications. I have this field set as a reference field. It is set to reference field because it is supposed to show all of the building options and pull that info from the building table. Is it possible that this is the issue? (client/includes script references tables other than the building table specified in the type specs for building field)

1 REPLY 1

AnirudhKumar
Mega Sage
Mega Sage

I'm going to take a guess here.

I think you want to set the value of a reference field. Is your script include returning a sysid or some other display value? A reference field needs a sysid.

And here are some silly suggestions...

- Are you able to alert out the value that you want to set from the client script? what is it?

- Are you using g_form.setValue() at the end?

- Is another client script executing that tends to clear out the value set by your script?