Get column names of a view

Hi,

is there any possibility to get all column names of a view, without loading the view?

like:

View v = "abc"
Column col
for (all) col in v do{
print attrName(col)
}

Thanks
Benn
BennK - Tue Nov 23 18:16:25 EST 2010

Re: Get column names of a view
Mathias Mamsch - Wed Nov 24 03:54:14 EST 2010

As far as I know a View has no columns, at least from the DXL perspective. A module has columns. A View contains data, that when loaded will create columns in the module, which you then can iterate with "for column in module". So, no, I don't think you can iterate over a non-loaded view.

But you can load a module invisble and still print the column titles (therefore not executing any Layout DXL, if this is the reason why you do not want to load the view).

Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Get column names of a view
RexHays - Mon Nov 16 17:25:33 EST 2015

Mathias Mamsch - Wed Nov 24 03:54:14 EST 2010
As far as I know a View has no columns, at least from the DXL perspective. A module has columns. A View contains data, that when loaded will create columns in the module, which you then can iterate with "for column in module". So, no, I don't think you can iterate over a non-loaded view.

But you can load a module invisble and still print the column titles (therefore not executing any Layout DXL, if this is the reason why you do not want to load the view).

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I have DXL code that is using the title for modifying the output that works very well as a Layout DXL. I want to convert this code to ad DXL Attribute. The problem is that the title perm does not work when the code is turned into DXL attribute. Is there a way to get the "title" type information from a DXL attribute when it is added to a view? I want to use one attribute several times in a view and modify the data displayed by reading and decoding the title. This works well in multiple Layout DXLs but not in a DXL attribute.

 

Thanks

 

Rex Hays

Re: Get column names of a view
Mathias Mamsch - Tue Nov 17 03:02:16 EST 2015

RexHays - Mon Nov 16 17:25:33 EST 2015

I have DXL code that is using the title for modifying the output that works very well as a Layout DXL. I want to convert this code to ad DXL Attribute. The problem is that the title perm does not work when the code is turned into DXL attribute. Is there a way to get the "title" type information from a DXL attribute when it is added to a view? I want to use one attribute several times in a view and modify the data displayed by reading and decoding the title. This works well in multiple Layout DXLs but not in a DXL attribute.

 

Thanks

 

Rex Hays

I don't think that this is possible, since an attribute DXL is not bound to a column like a layout DXL. In fact you can have the same attribute shown twice with different titles.

So you got two options:

a) Put the work intensive part of the code in the attribute DXL and create a layout DXL over it, that will use the column title to generate the final result

b) Iterate through the columns of the module (ouch!) until you find the right column and get its title

And you should not pull these very old posts, when your question is not completely in line with the topic of the post. Rather create a new one.

Regards, Mathias

Re: Get column names of a view
RexHays - Tue Nov 17 09:09:20 EST 2015

Mathias Mamsch - Tue Nov 17 03:02:16 EST 2015

I don't think that this is possible, since an attribute DXL is not bound to a column like a layout DXL. In fact you can have the same attribute shown twice with different titles.

So you got two options:

a) Put the work intensive part of the code in the attribute DXL and create a layout DXL over it, that will use the column title to generate the final result

b) Iterate through the columns of the module (ouch!) until you find the right column and get its title

And you should not pull these very old posts, when your question is not completely in line with the topic of the post. Rather create a new one.

Regards, Mathias

Mathias,

First of all, thank you for your quick response. I am sorry that I did it through an old post but it was late in the day for me and I am new to the forum and did not know how to direct a question that would come up to you as I did see that you were a frequent responder. I will look into the forums to understand the interface better next time.

I would like to pursue some issues around this so if you could give me a quick heads up on how to start a new thread, I will get the main points down.

Thanks

Rex Hays

Re: Get column names of a view
Mathias Mamsch - Wed Nov 18 04:48:49 EST 2015

RexHays - Tue Nov 17 09:09:20 EST 2015

Mathias,

First of all, thank you for your quick response. I am sorry that I did it through an old post but it was late in the day for me and I am new to the forum and did not know how to direct a question that would come up to you as I did see that you were a frequent responder. I will look into the forums to understand the interface better next time.

I would like to pursue some issues around this so if you could give me a quick heads up on how to start a new thread, I will get the main points down.

Thanks

Rex Hays

See a couple of people on this forum like me check the forum every day, sometimes multiple times. To address a question to certain person you can send a Private Message (PM) but I would suggest, you simply start a new thread using the pretty obvious button on the main page. Regards, Mathias