Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6507 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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" ;

...

...

)

Posted (edited)

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
Posted

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 ) )

)

Posted (edited)

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
Posted

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 ) )

)

Posted

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

Posted

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 ) )

)

Posted

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

This topic is 6507 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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