SimHub Functions

DND

Stay Safe, Healthy and be Kind - Stop Hate
Post here if you need help, or can provide it, to write functions within SimHub.
I'll start.
Goal:
Leaderboard last lap time will change color based on previous and best lap. 'A' would be my personal lap time and is what the formula is based on.

I created a formula in Excel I know works, I just need help in how to make it work in ncalc for SimHub
=IFS(LAST LAP=PREVIOUS LAP,"Yellow",LAST LAP<BEST LAP,"Purple",LAST LAP>PREVIOUS LAP,"Red",LAST LAP<PREVIOUS LAP,"Green")

I have tried this:
if([CurrentLapTime]<[BestLapTime],PURPLE,if([CurrentLapTime]<[LastLapTime],Green,if([CurrentLapTime]>[LastLapTime],Red,Yellow)))

And this:
if([CurrentLapTime]<[BestLapTime],PURPLE,[CurrentLapTime]<[LastLapTime],Green,[CurrentLapTime]>[LastLapTime],Red,Yellow)

Not having much luck with either so some help is required, please.
1618681233963.png
 
Last edited:

Latest News

How long have you been simracing

  • < 1 year

    Votes: 559 17.4%
  • < 2 years

    Votes: 379 11.8%
  • < 3 years

    Votes: 341 10.6%
  • < 4 years

    Votes: 243 7.6%
  • < 5 years

    Votes: 390 12.1%
  • < 10 years

    Votes: 367 11.4%
  • < 15 years

    Votes: 215 6.7%
  • < 20 years

    Votes: 168 5.2%
  • < 25 years

    Votes: 136 4.2%
  • Ok, I am a dinosaur

    Votes: 419 13.0%
Back
Top