Welcome, Guest
Python Scripts for ComicRack

TOPIC: Perform Math operations on Values?

Perform Math operations on Values? 1 year 3 weeks ago #46493

  • SoccerDad91016
  • SoccerDad91016's Avatar
  • Offline
  • Junior Boarder
  • Posts: 23
  • Thank you received: 1
  • Karma: 0
Is it possible to perform math operations on Values? For example, if I wanted to find the next to last issue in a series.

I can definitely get the last issue in a series using {StatsLastNumber}, using:

Match All
{
[Number] equals "{StatsLastNumber}"
}

But I have not been able to find a syntax for {StatsLastNumber} minus 1 that works.

Is this possible?
The administrator has disabled public write access.

Perform Math operations on Values? 1 year 2 weeks ago #46497

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
First things first you want to use 'Expression is True' for this and it is not clear you have experimented with this yet. <see here>

Also a real time saver: In the smart list dialogue click query and then right click for a list of all matches and values usable.




Even quicker you can double click in a field in the standard designer to pull up a useful Dialogue:




The expression you are looking for is:
Name "Last but one issue"
Match [Expression] is true "int({Number}) == int({StatsLastNumber})-1"

As a possible guess for what you may be looking for it is probably worth looking <here> for a script for the last few issues
and I made a script for the last six months the hard way: <here>
Last Edit: 1 year 2 weeks ago by jkthemac.
The administrator has disabled public write access.
The following user(s) said Thank You: Xelloss, SoccerDad91016

Perform Math operations on Values? 1 year 2 weeks ago #46509

  • Xelloss
  • Xelloss's Avatar
  • Online
  • Platinum Boarder
  • Posts: 460
  • Thank you received: 117
  • Karma: 24
O_O!! I didn't know comicrack had this kind of tools!!!

Almost 5 yeras and this software still amaze me... You can use Python code for a smart list condition without scripting and I never knew!

This would have helped me A LOT with attributes names in the past for scripting....
Last Edit: 1 year 2 weeks ago by Xelloss.
The administrator has disabled public write access.
Time to create page: 0.177 seconds

Who's Online

We have 278 guests and 4 members online