Skip to content

--view parameter of represt not working (not filtering the attributes that should not be in the view) #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
denisbelanger101 opened this issue Mar 10, 2025 · 5 comments

Comments

@denisbelanger101
Copy link

Hi,
I am using represt to export a DNG Module to Excel. The only remaining issue is this one. Here is what I found using the debug tool in elmclient. The DNG View URI is found using the text name of the view which is a good start. My command line is the following: represt rm resources -J "https:server" -U myusername-P mypassword! -p "myprojectname" -m "mymodulename" --view "Test1" -C "myCSVfilename"

So, the DNG View name is "Test1". In DNG, in the Module, you can see View "Test1". On the right side of the below screenshot, you can see the attributes selected to be visible in this View.
image

But in the Excel output file you can find all attributes of this Module, even the one that are not selected for this View. Since we are in a view that does not include these attribute, they should be filtered out and not appear in the Excel output file. Here is one of them as an example the below one...
image

And indeed, if I add this attribute to the view, it looks like this in DNG:
image

Is there someone who could look at this, I would appreciate it so much!

Thank you!

@barny
Copy link
Member

barny commented Mar 11, 2025

AFAICT what you're observing is how the DNG Reportable REST API works. The view filters the rows but doesn't observe the columns. This behaviour isn't mentioned in the documentation, but there is a section "Common information for the response" which implies that the listed attributes/info is common to all responses, i.e. not affected by asking for a view.

So the --view option is working correctly :-)

@denisbelanger101
Copy link
Author

denisbelanger101 commented Mar 11, 2025

Ok, just to summarize. A view in DNG does two things:

  1. it filters the row to show as shown below:
Image
  1. it records the columns to show for this view and hides the other columns (attributes), as shown below.
Image

So what you are saying is, that the DNG Reportable REST API does only the first item #1 above but not #2. Is this is correct, is there a way to grab the columns to show that are recorded by a view? Or if it will always show ALL columns of a Module?

@barny
Copy link
Member

barny commented Mar 12, 2025

the DNG Reportable REST API does only the first item #1 above but not #2.

Yes that's correct.

it will always show ALL columns of a Module?

Basically yes.

a way to grab the columns to show that are recorded by a view

In terms of APIs, I don't think so

In Report Builder you could (perhaps) reproduce the view and that can export to spreadsheet formats. Or similar with an RPE report.

@denisbelanger101
Copy link
Author

Great. Thanks. And a last thing, if the columns names are the same in from one file to the other, to export, is there a parameter I can use with represt to specify the column names that I want the code to export?

@barny
Copy link
Member

barny commented Mar 14, 2025

is there a parameter I can use with represt to specify the column names

No - although I'm sure it's possible. FYI I don't have any plan to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants