Author Topic: Formula conditional script  (Read 4868 times)

pmccarthy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Formula conditional script
« on: July 14, 2012, 08:17:06 PM »
Can you give an example of how this works, there is no documentation. I've tried to set a button background color based on a field value as a test, but get an error on the condition part of the statement.
IF($field = "True", true statement, false statement). I tried various formatting, but still get an error on the condition test.

CellicaTeam

  • Administrator
  • Hero Member
  • *****
  • Posts: 693
    • View Profile
Re: Formula conditional script
« Reply #1 on: July 16, 2012, 05:53:17 AM »
Could you please try the following query.
IF($field= {"True"},[Button].BackColor = {RGB(255:0:128)};,[Button].BackColor = {RGB(255:128:0)};)

pmccarthy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Formula conditional script
« Reply #2 on: July 16, 2012, 01:03:35 PM »
My statement reads  IF($room_status = {"Complete"},[button].Backcolor = {RGB(0:255:0)};,[button].Backcolor = {RGB(255:0:0)};)
 I get error "Missing operator after expression '$ROOM' ' in conditional expression: $ROOM'_STATUS={"COMPLETE"}

pmccarthy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Formula conditional script
« Reply #3 on: July 16, 2012, 01:12:58 PM »
I found it doesn't like the underscore in the fieldname. Anyway around that?

CellicaTeam

  • Administrator
  • Hero Member
  • *****
  • Posts: 693
    • View Profile
Re: Formula conditional script
« Reply #4 on: July 17, 2012, 01:25:58 AM »
Could you please send us logs from your desktop. Please zip this logs folder and send it to support@cellica.com

pmccarthy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Formula conditional script
« Reply #5 on: July 17, 2012, 06:58:57 PM »
I believe the issue is caused by field names over 8 characters. I added 2 fields to my table, test1234 and test12345. Formula works with test1234, but gets error using test12345.