Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with Integer to create an action in a script

Featured Replies

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

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 by comment

  • 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 

The expression =

not Mod ( Counter ; 3 )

will return true when Counter is divisible by 3 (e.g. 0, 3, 6, 9, 12, etc.).

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.