if object does not have link statement

I have a layout DXL column that acts as a summary column and displays one cell's worth of information from one of the preceding 4 columns. The info displayed by this summary column is chosen such that it will only display info from the highest priority column that has info present (#1, then #2, then #3, then #4).

However, the first column (highest priority) is a layout DXL column itself which displays info from a linked object in another module.

I couldn't figure out how to pull info from a layout DXL column (and I'm not sure that it can be done anyway from what I've gathered). So in order to display the information from column #1 in the summary column, I am checking for the existence of info in that linked object. If it's there, I display it (essentially displaying column #1's info), if not, I move on to column #2 and so forth.

My problem is that I cannot figure out how to identify objects that do not have links so that I can display column #2 (or #3, or #4)'s info in my summary column because my layout DXL starts with:

for l in (obj -> "*") do

which seems to skip objects which do not have links.

How do I get my summary column to go on to check column #'s 2, 3, and 4 if there is no link to that object?

Thanks in advance.
joshuauy - Fri Mar 02 15:22:19 EST 2012

Re: if object does not have link statement
joshuauy - Fri Mar 02 15:24:57 EST 2012

I guess the other option is to have column #1 to be composed of attribute DXL code which would make the data accessible to a layout DXL column (my summary column).. is this thinking correct?

Re: if object does not have link statement
llandale - Fri Mar 02 16:44:46 EST 2012

bool HasOutLink = false
Link l
for l in (obj -> "*") HasOutLink = true
if (!HasOutLink)
{    // object has no outgoing links; use col 2/3/4
}
else
{   // in links, use col 1

 


I haven't tried getting Layout text from another Layout, but if it can be one you can use the "text(column)" command to retrieve it.

The complicated Layouts are far better off being Attr-DXL since they are not recalculated so rediculously often.

-Louie

 

Re: if object does not have link statement
joshuauy - Fri Mar 02 17:02:44 EST 2012

llandale - Fri Mar 02 16:44:46 EST 2012

bool HasOutLink = false
Link l
for l in (obj -> "*") HasOutLink = true
if (!HasOutLink)
{    // object has no outgoing links; use col 2/3/4
}
else
{   // in links, use col 1

 


I haven't tried getting Layout text from another Layout, but if it can be one you can use the "text(column)" command to retrieve it.

The complicated Layouts are far better off being Attr-DXL since they are not recalculated so rediculously often.

-Louie

 

I'm getting this:

-E- DXL: <Line:3> incorrect arguments for (=)
-E- DXL: <Line:4> syntax error
-E- DXL: <Line:3> incorrectly concatenated tokens
-I- DXL: all done with 3 errors and 0 warnings

when I plug your above code directly into the layout DXL. I added the } at the end of the else statement, but is there anything else I'm missing to make this run?

Thanks

Re: if object does not have link statement
joshuauy - Fri Mar 02 17:25:14 EST 2012

joshuauy - Fri Mar 02 17:02:44 EST 2012
I'm getting this:

-E- DXL: <Line:3> incorrect arguments for (=)
-E- DXL: <Line:4> syntax error
-E- DXL: <Line:3> incorrectly concatenated tokens
-I- DXL: all done with 3 errors and 0 warnings

when I plug your above code directly into the layout DXL. I added the } at the end of the else statement, but is there anything else I'm missing to make this run?

Thanks

I think I figured it out, but it's a pretty in-elegant solution.

I added an attribute DXL column to show the number of outlinks and added an "if(outLinks == 0) or else" statement around all of my code. Again, it's ugly, but it seems to get the job done.

Thanks again.