"IN" Condition

I'm trying to run this code in AML studio, <Item type="MIN_DCP" action="get" select="id(item_number,name,description,system,call_ticket,modified_on)"> <id condition='in'>(select source_id from innovator.MIN_DCP_DELIVERED_BOM where related_id in (@Parameter)) </id> </Item> it works if I put a single value in the parameter box- example: (1F01BB4BA35B4E9D860C8E1362AD9CF3), but if I input two values (1F01BB4BA35B4E9D860C8E1362AD9CF3,206E8AE625044116B2271887C973FA24) I get the following error message: No items of type 'MIN_DCP' found using the criteria: <Item type="MIN_DCP" action="get" select="id(item_number,name,description,system,call_ticket,modified_on)" orderBy="item_number DESC"><id condition="in">(select source_id from innovator.MIN_DCP_DELIVERED_BOM where related_id in (N'1F01BB4BA35B4E9D860C8E1362AD9CF3,206E8AE625044116B2271887C973FA24'))</id></Item> ]]
Parents
  • Hello, When possible, we recommend avoiding the use of SQL in AML queries. For example, this could be rewritten without the use of SQL as below to accomplish the same filtering.
    <AML>
    <Item type="MIN_DCP" action="get" select="item_number,name,description,system,call_ticket,modified_on">
    <Relationships>
    <Item type="MIN_DCP_DELIVERED_BOM" action="get" select="related_id">
    <related_id condition="in">1F01BB4BA35B4E9D860C8E1362AD9CF3,206E8AE625044116B2271887C973FA24</related_id>
    </Item>
    </Relationships>
    </Item>
    </AML>
    Chris
    Christopher Gillis Aras Labs Software Engineer
Reply
  • Hello, When possible, we recommend avoiding the use of SQL in AML queries. For example, this could be rewritten without the use of SQL as below to accomplish the same filtering.
    <AML>
    <Item type="MIN_DCP" action="get" select="item_number,name,description,system,call_ticket,modified_on">
    <Relationships>
    <Item type="MIN_DCP_DELIVERED_BOM" action="get" select="related_id">
    <related_id condition="in">1F01BB4BA35B4E9D860C8E1362AD9CF3,206E8AE625044116B2271887C973FA24</related_id>
    </Item>
    </Relationships>
    </Item>
    </AML>
    Chris
    Christopher Gillis Aras Labs Software Engineer
Children
No Data