cancel
Showing results for 
Search instead for 
Did you mean: 

To compare value node

Former Member
0 Kudos

Hi, i need to compare two value, one it comes to LeadSelection (nodePo_Items) and another comes other table (nodeTemp_GetdetailSerivce_Output), but the comparison <b>(if)</b> don't work.

ex:

int m = wdContext.nodeZbapi_Po_Getdetail_Input().nodeOutput_Po_Getdetail().nodePo_Items().getLeadSelection();

int n = wdContext.nodeTemp_GetdetailSerivce_Output().size();

for(int i = n - 1; i >= 0; --i)

{

<b>if </b>(wdContext.nodeTemp_GetdetailSerivce_Output().getTemp_GetdetailSerivce_OutputElementAt(<b>i</b>).<b>getPckg_No</b>() <b>==</b> wdContext.nodeZbapi_Po_Getdetail_Input().nodeOutput_Po_Getdetail().nodePo_Items().getPo_ItemsElementAt(<b>m</b>).<b>getPckg_No())</b>

{

wdContext.nodeTemp_GetdetailSerivce_Output().removeElement(wdContext.nodeTemp_GetdetailSerivce_Output().getElementAt(i));

}

}

<i>somebody knows that it can happen? I am comparing bad?</i>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Antonio,

I think the data type of your attribute Pckg_No is other than integer (like String, Bigdecimal or like an Object). Hence you cannot do a comparison using '=='.

Instead use 'equals' method.

wdContext.nodeTemp_GetdetailSerivce_Output().getTemp_GetdetailSerivce_OutputElementAt(i).getPckg_No().equals(wdContext.nodeZbapi_Po_Getdetail_Input().nodeOutput_Po_Getdetail().nodePo_Items().getPo_ItemsElementAt(m).getPckg_No()))

I think it will work.

Regards,

Shubham

Answers (0)