Book a Demo

Author Topic: Setting status colors  (Read 3849 times)

Aleksandar

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Setting status colors
« on: September 23, 2013, 03:52:49 pm »
Hi,

I am trying to set the status colors through the automation interface. Since there are no methods for it, I'm using a sql querry to add a new status, in the t_statustypes table..which works perfectly fine.
However I'm unable to set the colors in the t_genopt table...  

sql = "UPDATE t_genopt SET Option='sName=On-going,sColor=128;sName=Rejected,sColor=32768;sName=Under Review,sColor=12639424;', AppliesTo='Status' WHERE AppliesTo='Status'";
               repositoryEA.Execute(sql);

Is the problem maybe that the Option field in     t_genopt is type MEMO, so it should be accessed differently?

Thank you,

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Setting status colors
« Reply #1 on: September 23, 2013, 03:59:33 pm »
Option may be a keyword in whatever database you are using. Try putting it inside square brackets

Code: [Select]
UPDATE t_genopt SET [Option]=...
The Sparx Team
[email protected]

Stefan Bolleininger

  • EA User
  • **
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Setting status colors
« Reply #2 on: September 23, 2013, 04:06:42 pm »
Hi Aleksandar,

I don't know so much about the correct sql syntax, but my working query is

Code: [Select]
sql = "UPDATE t_genopt SET Option='sName=On-going,sColor=128;sName=Rejected,sColor=32768;sName=Under Review,sColor=12639424' WHERE AppliesTo='Status'";
Regards

Stefan
Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

Aleksandar

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Setting status colors
« Reply #3 on: September 23, 2013, 07:21:47 pm »
Hi,


sql = "UPDATE t_genopt SET [Option]='sName=On-going,sColor=128;sName=Rejected,sColor=32768;sName=Under Review,sColor=12639424' WHERE AppliesTo='Status'";


Now it works fine. Thanks for the help :)