Skip 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.

Set Field on a number state

Featured Replies

Hello cannot get my head around this i want to search all my invoices and if the balance is <0.10 set the invoice state to "paid" i think my script is correct but alas it is not working. here is what i have.. and is this the best way to do this, the script willl load on log in and logout...

thanks

Screenshot_1.png

If [ INV_Invoice.tog::Balance.c < 0.10]

  • Author

Daniele, Thank you so much..... :cofeebrake:

Hi Robert

my answer was about the calc into the If [ ] step... but, reading your post carefully, that script can't do what you wish without a Loop on all records.

BTW: why not use a calculation field for Status with:

Case(

Balance.c < 0.10 ; "paid" ;

...

...

)

  • Author

that is a much better soulution here is what i used.

Case(Balance.c < 10000 ; "paid" ;TextColor ( Status ; RGB ( 0 ;255 ; 0 ) ) ; Status = "sent in post"; TextColor ( Status ; RGB ( 0 ; 0 ; 255 ) ) ; TextColor ( Status ; RGB ( 0 ; 0 ; 0 ) ) )

i changed the calc to 10000 just to test and all works apart from the text color is now not changing can you please tell me, have i missed some syntax to make this work. the reason i used a script is because i did not have the confidence to change it from text to calc field thanks i have learnt a lot today..

:smile2:

Edited by Guest

Try this:

Case(

Balance.c < 10000 ;TextColor ( "paid" ; RGB ( 0 ;255 ; 0 ) ) ;

Status = "sent in post"; TextColor ( Status ; RGB ( 0 ; 0 ; 255 ) ) ;

TextColor ( Status ; RGB ( 0 ; 0 ; 0 ) )

)

  • Author

ahhh i see thanks again

Case(

Balance.c < 100;TextColor ( "paid" ; RGB ( 0 ;255 ; 0 ) ))

& Case(

Balance.c > 100;TextColor ( "Sent in Post" ; RGB ( 0 ; 0 ; 255 ) ))

Edited by Guest
figured it all out thanks

B)

Didn't Status contain B) paid or Sent in post ??

Why IF balance.c > 100 = Sent in post ??

What IF balance.c = 100 ??

BTW: it is better to write your calc so:

Case(

Balance.c < 100 ; TextColor ( "paid" ; RGB ( 0 ;255 ; 0 ) )

Balance.c > 100 ; TextColor ( "Sent in Post" ; RGB ( 0 ; 0 ; 255 ) )

)

  • Author

B)

Didn't Status contain B) paid or Sent in post ??

Why IF balance.c > 100 = Sent in post ??

What IF balance.c = 100 ??

BTW: it is better to write your calc so:

Case(

Balance.c < 100 ; TextColor ( "paid" ; RGB ( 0 ;255 ; 0 ) )

Balance.c > 100 ; TextColor ( "Sent in Post" ; RGB ( 0 ; 0 ; 255 ) )

)

thanks i have now added the equal sign.

Case(

Balance.c < 100;TextColor ( "Paid" ; RGB ( 0 ;255 ; 0 ) ))

& Case(

Balance.c >= 100;TextColor ( "Sent in Post" ; RGB ( 0 ; 0 ; 255 ) ))

----------

if i use your statement i get an error, a operator is expected here + - * /

and it does not work, i tried messing but could not get it to validate.

Why IF balance.c > 100 = Sent in post ?

the job automatically creates the invoice and is printed also all invoices that are created are always in $ never any cents. thanks for showing me i am using the example 100, i will change this to .1 in the future..

if i use your statement i get an error, a operator is expected here + - * /

and it does not work, i tried messing but could not get it to validate.

There was a typo. Daniele overlooked a semicolon.

Case(

Balance.c < 100 ; TextColor ( "paid" ; RGB ( 0 ;255 ; 0 ) )[color:red];

Balance.c > 100 ; TextColor ( "Sent in Post" ; RGB ( 0 ; 0 ; 255 ) )

)

  • Author

Thanks John, and Daniele for your time this calc has saved me and others lots of time......

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.