What is the ticket submitter value if I am querying from a custom field?
I am trying to show all the assets that belongs to the user who submitted a ticket inside the ticket.
I have setup a custom field query as the following:
CUSTOM_2 | Multiple Select | query: select NAME from ASSET where OWNER_ID=*** |
The *** should be the submitter ID for the ticket, I have tried all SUBMITTER_ID and SUBMITTER_ID.HD_TICKET and HD_TICKET.SUBMITTER_ID but none of them did work.
If I put a number there (i.e 791 is an ID for a user who got some assets), the ticket will show the correct assets.
Please advise, thanks!
Answers (1)
I think the issue may have been due to the lack of a JOIN statement to pull data from the HD_TICKET table. See if this might work:
select NAME from ASSET A JOIN HD_TICKET T on (A.OWNER_ID = T.SUBMITTER_ID) where A.OWNER_ID=T.SUBMITTER_ID
John
Comments:
-
Sorry for the late reply, I am afraid it still doesn't work, it pulls out all the assets and not the ones specific to submitter .. any other suggestions? - aeliraqi 12 years ago