CA Service Management

Expand all | Collapse all

How do I concatenate fields in "Additional Search Arguments?  For an example, I want all records where assignee.last_name concatenated with assignee.first_name = 'FIRSTLAST' (yes, there are better ways of this specific inquiry, but it's the technique I'm

  • 1.  How do I concatenate fields in "Additional Search Arguments?  For an example, I want all records where assignee.last_name concatenated with assignee.first_name = 'FIRSTLAST' (yes, there are better ways of this specific inquiry, but it's the technique I'm

    Posted Oct 24, 2018 09:54 AM
      |   view attached

    I've tried "+", "|", and "&", but there doesn't seem to be a string concatenation operator to use in the "Additional Search Arguments" field.

     

    In SQL Server it would be CONCAT(first_field, second_field) or first_field + second_field.  Is there an equivalent syntax to use for "Additional Search Arguments"?



  • 2.  Re: How do I concatenate fields in "Additional Search Arguments?  For an example, I want all records where assignee.last_name concatenated with assignee.first_name = 'FIRSTLAST' (yes, there are better ways of this specific inquiry, but it's the technique

    Broadcom Employee
    Posted Oct 24, 2018 05:43 PM

    I can't recall SDM has such function.

    You could use the AND for this purpose. For example

    ((assignee.last_name='Administrator') AND (assignee.first_name='Ada'))

    is pretty much like search for assignee who's name is "Administrator, Ada"



  • 3.  Re: How do I concatenate fields in "Additional Search Arguments?  For an example, I want all records where assignee.last_name concatenated with assignee.first_name = 'FIRSTLAST' (yes, there are better ways of this specific inquiry, but it's the technique
    Best Answer

    Posted Oct 25, 2018 08:20 AM

    I agree AND will work in the case of a single case; it breaks down when you have several ordered pairs though:

     

    Concat(assignee.last_name,assignee.first_name) in (‘Last1First1’,’Last2First2’,’Last3First3’)

    vs

    assignee.last_name in (‘Last1’,’Last2’,’Last3’) AND assignee.first_name in (‘First1’,’First2’,’First3’).

     

    After some more digging, it appears you are correct – SDM doesn’t have the capability. Luckily, in most cases one can dig up a single ID field to encompass both criteria (assignee.userID in this case), and bypass the issue. I was just hoping concatenation was an option. I did find an excellent overview in the Technical Reference section of the documentation, under “Where Clauses”