January 6, 20179 yr Hi all, I want to create an action as part of a script that operates if the result of a calculation produces an integer such that: If[ Field A / Field B = Integer ] Show Custom Dialog [xxxxxx] Exit Script Can anyone assist please
January 6, 20179 yr 24 minutes ago, Oyseka said: if the result of a calculation produces an integer If the calculation is a division - as it is in your example - then the result will be an integer when there is no remainder. Once you restate the problem like that, the solution becomes obvious: If [ not Mod ( Field A ; Field B ) ] Show Custom Dialog [xxxxxx] Exit Script Rnd If In a more general case, a number is an integer when: Int ( number ) = number Edited January 6, 20179 yr by comment
January 6, 20179 yr Author Thank you comment but I am dorf and do not understand your solution. Perhaps I can give more information. I have a counter field for customer services which , normally , when it reaches 12 i.e. the twelfth month, produces a updated annual quote then resets to one. There is always one customer however that has a different requirement and this one wants a quarterly quote only. So as I have the mechanism in place, on this particular customer I want to set the script that if we have finished the second service and produced the next monthly quote, as the service counter is now set to 3 have a calculation that says if the result of Field (The counter) divided by 3 is an integer tell the PCO that a new quarterly Quote is required and take them to the Correct layout. This would then produce the 4 quotes per year for this customer
January 6, 20179 yr The expression = not Mod ( Counter ; 3 ) will return true when Counter is divisible by 3 (e.g. 0, 3, 6, 9, 12, etc.).
January 6, 20179 yr Author Wow, how cool is that. Sorry comment I was fixated on Integer. Thank you for your help once again
Create an account or sign in to comment