I'm in development stage, where I want to create a functionalci which is located in the user portal, then I want to create it, when the user selects a particular service, the specific assets for that service will appear.
e.g:
I have a service A, where depending on the ci I have entered 16 assets (functionalci), so when the user makes a request and the user enters asset(functionalci), 16 Assets (functionalci)which will appear and can be selected by the user.
I have tried using this OQL in <scopes> SELECT FunctionalCI AS fci JOIN lnkFunctionalCIToService AS lnk ON lnk.functionalci_id = fci.id WHERE lnk.service_id = "'.$this->Get('service_id').'"</scopes>
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You mean 16 FunctionaliCI are associated with a Service
If a user creates a UserRequest with this Service, then the 16 FunctionalCI should be also associated with the new UserRequest ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, 16 assets(functionalci) will appear in the asset(functionalci) selection form, but they are not selected automatically but the user making the request will be able to select 16 assets(functionalci) https://i.imgur.com/fUPHMlx.gif
can use this?
I have tried using this OQL in <scopes>
SELECT FunctionalCI AS fci JOIN lnkFunctionalCIToService AS lnk ON lnk.functionalci_id = fci.id WHERE lnk.service_id = "'.$this->Get('service_id').'"</scopes>
Or is there another way?
Thanks
Last edit: barakbar 2022-01-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Everyone,,
I'm in development stage, where I want to create a functionalci which is located in the user portal, then I want to create it, when the user selects a particular service, the specific assets for that service will appear.
e.g:
I have a service A, where depending on the ci I have entered 16 assets (functionalci), so when the user makes a request and the user enters asset(functionalci), 16 Assets (functionalci)which will appear and can be selected by the user.
I have tried using this OQL in <scopes>
SELECT FunctionalCI AS fci JOIN lnkFunctionalCIToService AS lnk ON lnk.functionalci_id = fci.id WHERE lnk.service_id = "'.$this->Get('service_id').'"
</scopes>Hello,
Not sure I get it ?
You mean 16 FunctionaliCI are associated with a Service
If a user creates a UserRequest with this Service, then the 16 FunctionalCI should be also associated with the new UserRequest ?
Yes, 16 assets(functionalci) will appear in the asset(functionalci) selection form, but they are not selected automatically but the user making the request will be able to select 16 assets(functionalci)
https://i.imgur.com/fUPHMlx.gif
can use this?
I have tried using this OQL in <scopes>
SELECT FunctionalCI AS fci JOIN lnkFunctionalCIToService AS lnk ON lnk.functionalci_id = fci.id WHERE lnk.service_id = "'.$this->Get('service_id').'"</scopes>
Or is there another way?
Thanks
Last edit: barakbar 2022-01-04
Hello,
Many thanks for the gif, I understand better now !
Don't change scopes for this ! Scopes are made solely to restrict user rights in the portal.
You may take a look at the prefill methods ? See Form Prefill [iTop Documentation]
Is this in your XML? In the XML you can't just suddenly add PHP.
You'd need to change the last part to
lnk.service_id = :this->service_id