Troubleshooting Issue with Where Clause
Posted: February 12th, 2022, 4:59 pm
I have a scenario which has a few things I need help with.
I have a GetAvailability method within GetItemDetails and GetAvailability has an exception:
Name cannot begin with the '=' character, hexadecimal value 0x3D. Line 2, position 22.
Viewing from within the GetAvailability tab, it shows no services ran
And I get the same error working in the method canvas trying to "run" or "run in step".
QUESTION 1: Is there a way to point at the specific service that is the source of the issue in the logs?
To troubleshoot, I opened another method canvas and tried to copy all the services to the other canvas so I could delete the services one by one until it ran. Then I would know which one had the incorrect syntax causing the issue.
BUG 1: it looks like I'm only able to copy 1 service at a time. If I try more, the source canvas still has the loading wheel and the place I try to paste it says "Failed to paste"
I went through copying one by one and seeing if it still runs each time
BUG 2: I noticed binary decisions past with their Yes/No locations reset
I found the service that had the issue. It is called GetAllBranchPlantQuantities and it has an issue with this where clause:
Here is the text of the where Clause
QUESTION 2: From the screenshot, is it telling me what is wrong with it and I am just missing it? I can put this in the where clause using blocks and filters, but I would also expect to be able to paste it into the where clause and have that work
BUG 3: not a big deal, but when I drag over the recommended value and have something highlighted I want it to replace, it just concats it instead
I have a GetAvailability method within GetItemDetails and GetAvailability has an exception:
Name cannot begin with the '=' character, hexadecimal value 0x3D. Line 2, position 22.
Viewing from within the GetAvailability tab, it shows no services ran
And I get the same error working in the method canvas trying to "run" or "run in step".
QUESTION 1: Is there a way to point at the specific service that is the source of the issue in the logs?
To troubleshoot, I opened another method canvas and tried to copy all the services to the other canvas so I could delete the services one by one until it ran. Then I would know which one had the incorrect syntax causing the issue.
BUG 1: it looks like I'm only able to copy 1 service at a time. If I try more, the source canvas still has the loading wheel and the place I try to paste it says "Failed to paste"
I went through copying one by one and seeing if it still runs each time
BUG 2: I noticed binary decisions past with their Yes/No locations reset
I found the service that had the issue. It is called GetAllBranchPlantQuantities and it has an issue with this where clause:
Here is the text of the where Clause
QUESTION 2: From the screenshot, is it telling me what is wrong with it and I am just missing it? I can put this in the where clause using blocks and filters, but I would also expect to be able to paste it into the where clause and have that work
Code: Select all
Where (
(
((COALESCE(IOMMEJ, 0) >= <xsl:value-of select="WorkData/GetCurrentDateTime/Output/Result/JDEDate"/> AND
COALESCE(IODLEJ, 0) <= <xsl:value-of select="WorkData/GetCurrentDateTime/Output/Result/JDEDate"/>)
OR
(COALESCE(IOMMEJ, 0) = 0 AND
COALESCE(IODLEJ, 0) = 0))
AND
(<xsl:for-each select="WorkData/Items/Output/Result">
<xsl:variable name="Itm" select="ItemNumber" />
(IBLITM = '<xsl:value-of select="ItemNumber"/>'
<xsl:choose>
<xsl:when test="/WorkData/Prevalues/Output/Result/BranchPlantFilterMode='One'"> and LTRIM(LIMCU) = '<xsl:value-of select="BranchPlant"/>'</xsl:when>
<xsl:when test="/WorkData/Prevalues/Output/Result/BranchPlantFilterMode='Many'"> and LTRIM(LIMCU) IN (<xsl:value-of select="/WorkData/ApprovedBPList/Output/Result[ItemNumber=$Itm]/ApprovedBPList"/>) </xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>)
<xsl:if test = "position() != last()"> OR </xsl:if>
</xsl:for-each>)
)
)