Hello, I was wondering if there is any way of adding a button on the UserRequest(Portal) for exporting to csv or excel, I couldnt find any info on the web, so maybe you could help me out, thx
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
but thats made from the itop/pages web if im not wrong, i need to add a button to the portal to export the ticket I have selected, ill put a image where i want to add the button.
Btw, where do i need to add that html code for creating a button on the portal for the current user request, its on datamodel.itop-tickets.xml? or is on other file? thx
Well, I am not sure that you can do it from the portal, but you can try to put it within the list of attributes which are part of the csv export in the ManageBrick definition.
<export><fields><fieldid="service_details"/>...
With the latest version of itop-request-template those fields are stored in standalone rows, so can be queried by OQL
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to do it like this:
First step -> created a new AttributeExternalKey on the class ticket for getting the templatefieldvalue.
Second step -> created a new AttributeExternalField to reference the value of the field and the code of it
Third step -> go to the <export><fields> and put the field AttributeExternalField on it
Fourth step -> added a scope for the class templatefieldvalue</fields></export>
Is that ok?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I doubt that any other method than <field id="user-content-service_details"> would work as your Portal has no clue of which fields will be created in the Template, so AttributeExternalField cannot work ! One information is part of the code, the other is dynamic while using itop.</field>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I was wondering if there is any way of adding a button on the UserRequest(Portal) for exporting to csv or excel, I couldnt find any info on the web, so maybe you could help me out, thx
https://www.itophub.io/wiki/page?id=2_7_0%3Acustomization%3Aportal_xml
Within the ManageBrick, there is an <export> tag which enable that feature.
So you can have it on a list only and you can define which fields are part of the export.</export>
but thats made from the itop/pages web if im not wrong, i need to add a button to the portal to export the ticket I have selected, ill put a image where i want to add the button.
Btw, where do i need to add that html code for creating a button on the portal for the current user request, its on datamodel.itop-tickets.xml? or is on other file? thx
No, this is definitely part of the portal customization !
Go see the link VIncent sent you and have a try !
Last edit: Pierre Goiffon 2020-08-17
but can you export fields from the module itop-request-template? at the same time with fields from ticket?
Well, I am not sure that you can do it from the portal, but you can try to put it within the list of attributes which are part of the csv export in the ManageBrick definition.
With the latest version of itop-request-template those fields are stored in standalone rows, so can be queried by OQL
I tried to do it like this:
First step -> created a new AttributeExternalKey on the class ticket for getting the templatefieldvalue.
Second step -> created a new AttributeExternalField to reference the value of the field and the code of it
Third step -> go to the <export><fields> and put the field AttributeExternalField on it
Fourth step -> added a scope for the class templatefieldvalue</fields></export>
Is that ok?
btw,
<field id="service_details"/>
that worked too, but it shows all fields on the same cell and thats a bit roughI doubt that any other method than <field id="user-content-service_details"> would work as your Portal has no clue of which fields will be created in the Template, so AttributeExternalField cannot work ! One information is part of the code, the other is dynamic while using itop.</field>
ok thx