Excellent work, Kelly!  This one's a keeper.  Thanks so much!

Rick

On Tue, Jun 15, 2010 at 12:55 PM, Kelly Logan <kelly.lo...@genmills.com>wrote:

> **
>
> Delving into this more, I developed a theories that I believe are fairly
> well confirmed:
>
>
>
> 1.)    Enumerated field alias values are stored only in
> field_dispprop.propLong.
>
> a.       If a field with no alias has one added, the display data is moved
> from propShort to propLong, with the alias data added.
>
> b.      If a field with alias values set has them set to match the
> selection values (default), the alias data is removed and the display data
> moved to the propShort field.
>
> 2.)    Changes to an enumerated field’s selection values will
> automatically propogate to every join form that does **not** have alias
> values set.
>
>
>
> Here’s what I did to investigate:
>
> Once I started opening more of the join forms, I found that most had
> ‘updated’ after I changed the menu field on BaseElement.  So why didn’t they
> all?
>
>
>
> I poked around the field_dispprop table and found that the forms  that did
> not change had propLong values, whereas the forms that had changed all had
> propShort values.
>
>
>
> My theory is that when alias values are set, the display information is
> moved to the propLong field and recorded there.  When alias values are set
> to the selection values (the default), no information is stored; i.e., no
> alias information means use the selection values.  Efficient.
>
>
>
> To test this, I ran a query to see the forms/views that had PropLong set
> for the ‘DRP Tier’ field (2000003168):
>
>
>
> select arschema.name,fd.vuiId, propLong
>
> from field_dispprop fd
>
>   inner join arschema ON fd.schemaId = arschema.schemaId
>
> where fieldId = 2000003168 and propLong is not null
>
>
>
> The first thing I noticed is that all of them had the section I had
> identified as the alias information:  “\0\1\1\2\2\3\3\N/A\”
>
>
>
> I then modified the query to check:
>
>
>
> select arschema.name,fd.vuiId, propLong
>
> from field_dispprop fd
>
>   inner join arschema ON fd.schemaId = arschema.schemaId
>
> where fieldId = 2000003168 and
>
>   propLong like '%\0\1\1\2\2\3\3\N/A\%'
>
>
>
> This returned the same entries.
>
>
>
> To check that aliases were only in the propLong field, I searched in
> propShort:
>
>
>
> select fd.vuiId, propShort
>
> from field_dispprop fd
>
> where fieldId = 2000003168 and
>
>   propShort like '%\0\1\1\2\2\3\3\N/A\%'
>
>
>
> No rows returned.
>
>
>
> To confirm the theory, I then updated the forms that had alias values, one
> by one, and re-ran the propLong query in between.  After each update, the
> form disappeared from the query as it no longer had a propLong value set.
>
>
>
> So, as I see it, the good news is that when you change an enumerated field,
> any join form that you haven’t manually set alias values on will
> automatically update, and those that you have can be found with propLong
> queries similar to the above.
>
>
>
> Investigatively  yours,
>
>
>
> Kelly Logan
>
>
>
> *From:* Action Request System discussion list(ARSList) [mailto:
> arsl...@arslist.org] *On Behalf Of *Ben Chernys
> *Sent:* Tuesday, June 15, 2010 12:10 AM
> *To:* arslist@ARSLIST.ORG
> *Subject:* Re: Mass modify of enumerated alias values
>
>
>
> **
>
> PS.  If it's in BaseElement there are no join forms to mass-modify.  Just
> base element.  They are "join forms" after all.
>
> field_dispprop holds info about the field display properties.  You do not
> want to modify these.
>
>
>
> I thought you were talking about the values stored in the db.
>
>
>
> If you want to do a mass change to all the join form definitions, that is a
> different story.  Meta-Update will not do this, nor will chgselection (or
> whatever that tool's name was) nor will SQL.
>
>
>
> You can automate the mass change with "driver" but this is rather ugly at
> best.  I would simply write a quick binary to do it.  The GUI generator
> function of the class manager should also do it for you but I would really
> recommend you take a cold backup of the db first!  ie shut down ARS and use
> the DB tools to take a backup.  Remember you must change each View of the
> form as well (esp for different locales).
>
>
>
> Another plausible option is to export the joins to .def files, edit the def
> files, and re-import.  Again do it very carefully.  DB backup highly
> recommended.  Try on dev first!!!!
>
>
>
> Cheers
>
> Ben
>
>
>  ------------------------------
>
> *From:* Ben Chernys [mailto:ben.cher...@softwaretoolhouse.com]
> *Sent:* June 15, 2010 6:22 AM
> *To:* 'arslist@ARSLIST.ORG'
> *Subject:* RE: Mass modify of enumerated alias values
>
> This is not an OOTB field, right?  I presume you added it to BaseElement
> then.   I presume the enum in q is a "standard" enum (ie 0,1,2,3, ...)
> rather than an enum which has the values declared (1000, 2000, etc).  The
> latter is always a bit easier to handle.
>
>
>
> The fastest and easiest is with SQL if you have no need for auditing and
> the like.  You must do it carefully !! esp. in the right order.
>
> If you added 5 and there are 10 already, change 9 -> 10, 8->9, etc
>
>
>
> There was also a free tool that purported to do this.  chgselection? or
> something of that nature.
>
>
>
> Or, you could use Meta-Update and simply effect the changes with the enum
> labels:
>
>
>
> DRP Tier = @LookUp, LkupDRP, $Src, DRP Tier$
>
>
>
> [LkupDRP]
>
> enum2   = enum5
>
> enum3  = enum6
>
> etc.
>
>
>
> The free trial license will be enough to complete this job.  Email me
> off-list for further info.
>
>
>
> Cheers
>
> Ben Chernys
>
> Senior Software Architect
> Software Tool House Inc.
>
> Canada / Deutschland / Germany
> Mobile:      +49 171 380 2329    GMT + 1 + [ DST ]
> Email:       Ben.Chernys _AT_ 
> softwaretoolhouse.com<ben.cher...@softwaretoolhouse.com>
> Web:         www.softwaretoolhouse.com
>
> Check out Software Tool House's free Diary Editor.
>
> *Meta-Update**,* our premium ARS Data tool, lets you automate
> your imports, migrations, *in no time at all*, without programming,
> without staging forms, without merge workflow.
> http://www.softwaretoolhouse.com/
>
>
>  ------------------------------
>
> *From:* Action Request System discussion list(ARSList) [mailto:
> arsl...@arslist.org] *On Behalf Of *Kelly Logan
> *Sent:* June 15, 2010 12:05 AM
> *To:* arslist@ARSLIST.ORG
> *Subject:* Mass modify of enumerated alias values
>
> **
>
> Hello All,
>
>
>
> Our organization needs to use a different structure for the enumerated
> field ‘DRP Tier’ on the asset forms.  Fortunately, these are all derived
> from the field on the BMC.CORE:BMC_BaseElement form, so changing the
> selection value on that form changes the selection value on the 140+ other
> join forms that are based on it.  What it doesn’t do is update the alias
> values, so even the display of the value is incorrect.
>
>
>
> Is there a way to mass modify the alias values of all of these join forms?
> I’m thinking the key is in the fields_dispprop form prop(Short/Long) fields,
> but I don’t know how to decipher these.
>
>
>
> Kelly Logan
>
>
>
> _attend WWRUG10 www.wwrug.com ARSlist: "Where the Answers Are"_
>
> _attend WWRUG10 www.wwrug.com ARSlist: "Where the Answers Are"_
>  _attend WWRUG10 www.wwrug.com ARSlist: "Where the Answers Are"_

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug10 www.wwrug.com ARSlist: "Where the Answers Are"

Reply via email to