Community

FlexiLanguage Newbie

Hi, trying to use the following with no success:

if SearchElements.RepeatingGroup.CurrentInstance.csQuantity.IsNull then
searchelements.RepeatingGroup.CurrentInstance.csQuantity.Value=SearchElements.RepeatingGroup.CurrentInstance.csLineTotal.Value/SearchElements.RepeatingGroup.CurrentInstance.csUnitValue.Value;

I get the error message : "Error in position 139: Wrong parameters for operator /"

So is this a syntax thing or am I just way off? I'm keying this into the Advanced Post-Search Relations tab and my goal is to mathematically determine a quantity of items by dividing the line total by the unit value, when the quantity field is missing or cannot be read. Can this even be done?

Was this article helpful?

0 out of 0 found this helpful

Comments

4 comments

  • Avatar
    Alberto Torino
    Hello MikeD:
    I think the problem is that csQuantity is Null. Being null means that it does not point to a valid object. A valid object is needed in order to set its properties.
    Regards,
    Alberto
    0
  • Avatar
    Permanently deleted user
    Interesting, thanks. So how would one say if element X "is NOT found" do Y? Is that not possible? "IsNull" was the only option I could see in contrast to "IsFound".
    0
  • Avatar
    Alberto Torino
    Hello MikeD:
    Remember that the objective in Flexilayout studio is finding the blocks, not the actual fields values. That will be done in Flexicapture. I suggest you implement what you need as a rule in Flexicapture.

    Regards
    0
  • Avatar
    Permanently deleted user
    Right. Good point. I'll see what I can figure out.
    0

Post is closed for comments.