I have a LANSA built File that I am trying to add a Boolean field to with the default value of TRUE so that EVERY EXISTING RECORD in the File will be set to True.
I tried using 1 for the default value, but it changes to +1 and still default to 0.
Thanks,
Joe
However when I compile the Table with Rebuild / Drop and Load the Field is always (0) False.
How do I make the IsEnabled Field default to True (1)?Add Boolean Field with Default True to LANSA File
Re: Add Boolean Field with Default True to LANSA File
I would bet that LANSA uses SQL or CPYF under the covers and does not go through the OAM. That means that you would have to set your own default for existing records.
Art
Art
Art Tostaine
Re: Add Boolean Field with Default True to LANSA File
That means setting the ASQN attribute which also means having to check for NULL or True for EVERY QUERY.
Ugh.
Was hoping to not have to do that, but it seems like the only way.
Thanks Art.
Ugh.
Was hoping to not have to do that, but it seems like the only way.
Thanks Art.
Re: Add Boolean Field with Default True to LANSA File
After you recreate the file why can't you fix the records? Are you doing this as part of a production job or development?
Can't you run an update file set isAdmin = true after?
Can't you run an update file set isAdmin = true after?
Art Tostaine
Re: Add Boolean Field with Default True to LANSA File
I can and will probably do that instead of trying to do some dynamic where clause.
The issue is that this is in production and we have automated deployments so we will kick this off at night when no one is on the system. At which point I will have to log in from home and run the update script.
Its more steps that would be completely unnecessary if it honored the default value like it should.
The issue is that this is in production and we have automated deployments so we will kick this off at night when no one is on the system. At which point I will have to log in from home and run the update script.
Its more steps that would be completely unnecessary if it honored the default value like it should.
Re: Add Boolean Field with Default True to LANSA File
To me this is quite clearly a defect and should be reported as such.