Alpha Video Training
Results 1 to 8 of 8

Thread: Dialog Conditional Style Help

  1. #1
    Member
    Real Name
    Keith Hart
    Join Date
    Aug 2010
    Location
    Calgary, AB
    Posts
    116

    Default Dialog Conditional Style Help

    Hi,

    I'm trying to style (turn text red) a numeric field in a repeating section conditionally based on another numeric field's value.

    Sounds easy enough...

    In the Client-side Conditional Style I have tried the following:

    field1>0 - works
    field1<0 - works
    field1=0 - fail
    field1>=0 - fail
    field1<=0 - fail
    field1>100 - works
    field1<100 -fail
    field1=100 - works
    field1>=100 - works
    field1<=100 - fail

    Can someone explain


    Thank you

  2. #2
    Member
    Real Name
    Keith Hart
    Join Date
    Aug 2010
    Location
    Calgary, AB
    Posts
    116

    Default Re: Dialog Conditional Style Help

    No takers huh.

    Ok, I'm asking the wrong question, so let's try a different one.

    Let's say you have a dialog with a repeating section in it.
    In the repeating section you have 2 numeric fields (field1, field2).

    How would you turn field1 red if the value in field2 was <=0?

  3. #3
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,044

    Default Re: Dialog Conditional Style Help

    you might want to try "<==0" if that doesnt work then use OR
    as in
    field1 = 0 OR field1 <0
    I beleive you can write two seperate conditions as well one for <0 and one for =0
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  4. #4
    Member
    Real Name
    Keith Hart
    Join Date
    Aug 2010
    Location
    Calgary, AB
    Posts
    116

    Default Re: Dialog Conditional Style Help

    Hi Charles

    Thank you for your reply

    That gave me an error.

    I'm trying all this in the Client Side Properties, Conditional style area

    CellStyle.jpg

    Is this where you would do this?

    Regards,

  5. #5
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,044

    Default Re: Dialog Conditional Style Help

    Just use two separate conditions then...the order would make or break it though since the evaluation would be in the order of the conditions.
    First test
    field1 = 0
    second condition field1<0
    and I think that would do it for you.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  6. #6
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,044

    Default Re: Dialog Conditional Style Help

    you might also want a condition if it is blank
    field1 = ' '
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  7. #7
    Member
    Real Name
    Keith Hart
    Join Date
    Aug 2010
    Location
    Calgary, AB
    Posts
    116

    Default Re: Dialog Conditional Style Help

    Hi Charles

    Ok, got it to work

    field2=0 - turn red
    field2<0 - turn red
    field2>0 - turn black

    I'm confused as to why I needed the last condition to turn the fields to black but it seems to work for now

    Also can anyone explain why "<=" doesn't work at all?

    Thanks for your help

  8. #8
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,044

    Default Re: Dialog Conditional Style Help

    Pretty sure need to tell it what to look like or it will just be the default of the original style. As far as two parameters, I am not sure but it could be that the statement never completes as either true or false.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

Similar Threads

  1. between_date conditional style
    By betty in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 03-16-2013, 06:47 AM
  2. Conditional Style - Date Type - Textbox - Conditional Style Level: Both
    By billamidon in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 12-18-2011, 02:54 AM
  3. Javascript conditional style
    By ssmoore1 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 1
    Last Post: 11-04-2010, 11:04 AM
  4. Conditional Style
    By cbbankz in forum Application Server Version 10 - Web/Browser Applications
    Replies: 4
    Last Post: 07-07-2010, 06:42 PM
  5. Conditional Style a little quirky?
    By fsi in forum Application Server Version 10 - Web/Browser Applications
    Replies: 6
    Last Post: 10-16-2009, 08:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •