Skip to main content

Hi @Naveen B , All,

 

I have the following Generic Inquiry which I need to calculate a new cost from the attributes against the Item.  I think the calculation is not working due to the data types but am struggling with what prefix to use.

Attributes:-

I have tried using the Mask without luck also.  The generic inquiry is attached.

Any help appreciated.

Regards,

laura

 

Hi @lauracastagna 

Could not open the GI, got following error. 

 

Just send the screenshot reflecting the expression you have used for specific column in question. 

Regards,


Hi @lauracastagna 

Please use the value field instead of attributeID

you wrote like below

=CDec((cLength.AttributeID])*CDec(eRate.AttributeID])*CDec(eMass.AttributeID]))

It should be 

=CDec((eLength.Value])*CDec(DRate.Value])*CDec(DMass.Value]))

I tried and was able to get the calculated value. 

We should use Entry Mask as well,

 

 


Hi,

still no luck when i changed it.  including the mask on the Attribute:-

 


Hi @lauracastagna 

In your GI the Condition was added wrongly. I’ve corrected and verified. Please find the sample xml for your verification.


Hi, @lauracastagna Hope you are doing well!

The above solution provided by @jinin is working as expected! Do you see still error?


Thank-you @jinin and  @Naveen B

“some” don’t calculate still.  I cant work out the difference. 

Also I had to add “+” Attribute Punch.

Could you please take a look?

 


Hi, @lauracastagna  I see some issue with JOIN conditions and due to that you are not able to fetch the expected value. I have attached the working GI here, please verify.

Here are the issue and fix details

Join condition should be like → Punch.AttributeID Equals =’Punch’, and I have seen the same issue with the Glass related attributes and I have modified it. Please find the latest attached XML GI for your reference. 

 

 

 

 


thanks @Naveen B .

hopefully the last thing……

when there is No punch value the calculation does not work.  I’m not multiplying just adding so not sure what I’ve missed.

 


Hi @lauracastagna  I have removed the grouping and added NULL conditions to the formula.

Please find the attached updated GI.

 


Hya,  still some that wont populate @Naveen B 

 

 


 Hi @lauracastagna    Since the Mass attribute value is less than 0.5 i.e., 0..3, it is considered 0 and getting the result as 0.

Please use the below formula and it will work with the 0.

Please use the CDbl instead of CDec conversion.

=CDbl((IsNull(uLength.Value],0)))*CDbl((IsNull(uRate.Value],0)))*CDbl((IsNull(uMass.Value],0)))+ CDbl( (IsNull(uPunch.Value],0)))

 

 Hi @lauracastagna  Since the Mass attribute value is less than 0.5 i.e., 0..3, it is considered 0 and getting result as 0.

Please use the below formula and it will work with the 0.

Please use the CDbl instead of CDec conversion.

=CDbl((IsNull(ILength.Value],0)))*CDbl((IsNull(IRate.Value],0)))*CDbl((IsNull(IMass.Value],0)))+ CDbl( (IsNull(IPunch.Value],0)))

 

 


THANK YOU @Naveen B !


Most Welcome @lauracastagna 


Reply