column text help

I am recently new to DXL. I am attempting to write a simple script to alter the text displayed in a column identified by the specific column title. I posted my code below. Can someone tell me why >display "here"
does not actually write that text in the column?

-----------------------code----------------------------------------
////////////variable declarations ////////////////////////////////////////////////////////
Module lvpM = edit ("LVP FMEA", true)
Object o = first lvpM
Column thisCol = column(0)
string isTitle, compare
//////////////////////////// Begin Main //////////////////////////////////////////////////
for thisCol in lvpM do {
isTitle = title(thisCol)
for o in lvpM do{
compare = "Hazardous Situation"
if(isTitle == compare){
display "here"
}
}
}

infoBox "complete"
SystemAdmin - Wed Mar 11 15:53:56 EDT 2009

Re: column text help
SystemAdmin - Thu Mar 12 03:07:00 EDT 2009

Well, that depends on what you are aiming for - what do you want to the end result to be? Your example script is mixing Layout DXL column functions and dialog based DXL.

If you just want to change an attribute value for all objects then the core part for your code would be:

for o in lvpM do
{
o."Hazardous Situation" = "here"
}

...if the column title is the same as attribute name displayed in column.

Re: column text help
Tony_Goodman - Thu Mar 12 04:53:07 EDT 2009

Columns are a mechanism for displaying information - they do not contain information.

Information is stored in attributes.

Columns can display attribute values or they can display other information that is controlled by Layout DXL. Layout DXL is stored in the column and runs dynamically as the object is dispayed.

Re: column text help
SystemAdmin - Thu Mar 12 10:49:21 EDT 2009

Tony_Goodman - Thu Mar 12 04:53:07 EDT 2009
Columns are a mechanism for displaying information - they do not contain information.

Information is stored in attributes.

Columns can display attribute values or they can display other information that is controlled by Layout DXL. Layout DXL is stored in the column and runs dynamically as the object is dispayed.

Okay, I think I understand the flaw in my scripting so far. The text I need is not an attribute.

Regarding layout DXL, how would one write a script to display "This is the specific object" in only one object of a column?

In other words, I am going to need to write different text to display in each different object of a certain column, but the text is not going to be stored in an attribute. Please ask me to clarify if I am not being clear. Thanks for your help.

Re: column text help
strathglass - Thu Mar 12 11:13:23 EDT 2009

SystemAdmin - Thu Mar 12 10:49:21 EDT 2009
Okay, I think I understand the flaw in my scripting so far. The text I need is not an attribute.

Regarding layout DXL, how would one write a script to display "This is the specific object" in only one object of a column?

In other words, I am going to need to write different text to display in each different object of a certain column, but the text is not going to be stored in an attribute. Please ask me to clarify if I am not being clear. Thanks for your help.

In your example you declared "Object o"
...but then used Column(0)!!

Anyways, try this:
via menu: Insert --> Column...
then via "New Column" window:
enter a title for your new column (at the bottom)
click Layout DXL radio button;
click Browse...;
click New;
then in the "Edit Layout DXL" window write (or copy & paste from your previously-created DXL source file) your layout DXL script.

This script will get stored with the layout DXL column: if you don't save this view where you added the Layout DXL column however, it is lost when you change views or exit the module.
(So save your view after you do this!)

If you want to see the code again later on, right click the column heading and click Properties... and then Browse... and then Current.

In your layout DXL script 'display "HERE"' will work!
Note that in layout DXL there is a pre-declared Object obj that is the current object.
e.g. this is valid layout DXL

int plus1=intOf(obj."Absolute Number" "") + 1
display plus1 ""

If you put this in a column headed as "Absolute Number" you will really mess people up! :)

Regards,
Strathglass

Re: column text help
Tony_Goodman - Thu Mar 12 12:01:44 EDT 2009

SystemAdmin - Thu Mar 12 10:49:21 EDT 2009
Okay, I think I understand the flaw in my scripting so far. The text I need is not an attribute.

Regarding layout DXL, how would one write a script to display "This is the specific object" in only one object of a column?

In other words, I am going to need to write different text to display in each different object of a certain column, but the text is not going to be stored in an attribute. Please ask me to clarify if I am not being clear. Thanks for your help.

Why would you not store the information in an attribute?

Sounds like you need to use a DXL attribute. This is an attribute that contains DXL. The DXL is used to control the value of the attribute.

For example the following DXL sets the value of the attribute to "top" only if the object is at level 1.

if (level(obj) == 1)
obj.attrDXLName = "top"

What you need to do:
1. Select Edit > Attributes
2. Click on new
3. Enter a name for your attribute ans select type string
4. Check the DXL Attribute box
5. Click on Browse
6. Click on current
7. Enter your DXL code
8. Click OK

Re: column text help
SystemAdmin - Thu Mar 12 12:56:41 EDT 2009

Thanks everyone. These are all things I needed to learn as a DXL rookie. All of this has put me back on track. I will post again if I hit another snag.