NetTalk Central

Author Topic: Conditionally Color Row if a certain field has value?  (Read 1827 times)

lgoolsby

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Conditionally Color Row if a certain field has value?
« on: March 28, 2014, 06:52:28 AM »
I need to highlight rows in a browse where field "SPOUSE" has a value.  Additionally, I need to deactivate the INSERT button for any rows meeting this criteria.  Please advise how best to do this.

Thanks,

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Conditionally Color Row if a certain field has value?
« Reply #1 on: March 28, 2014, 10:39:49 AM »
Hi
You can set the background colour of a field, or fields  in the browse.
Highlight the field
Click Properties
Go to the conditional tab
Click Insert
In the condition field enter the condition under which the background colour will be set e.g. FIL:Relationship ='SPOUSE'
in the css class field put ' orange-bg' for example. Note the space at the beginning. This appends this css to the existing css settings already allocated to this field. If you leave the space out then it will overwrite all the existing settings.
You can see the preallocated background colours in the web\styles\netweb.css file. You can obviously set your own using a custom.css fiel of your own. See Bruce's webinars on Clarion live for how to do this..

I'm not sure why you would be deactivating the INSERT button. Insert will add new rows, not have any effect on the existing row.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

lgoolsby

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Conditionally Color Row if a certain field has value?
« Reply #2 on: April 29, 2014, 10:42:57 AM »
Terry,

Thanks for the reply, highlighting the fields worked perfectly.  I misspoke about deactivating the INSERT button.  What I want to do is DISABLE the INSERT button on a child browse.  If the SPOUSE field is set to 1 then I need to disable the child browse insert button and tell the user to find the spouses record to insert a child record from.  Thus, I need to disable that button and then have a message above or below it telling user to use the spouses record for this action.

Thanks again,

Lee Goolsby

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11182
    • View Profile
Re: Conditionally Color Row if a certain field has value?
« Reply #3 on: April 29, 2014, 11:57:42 PM »
I think you might need to post a small example Lee. Or maybe edit one of the examples (the "Books" one has a Invoices / LineItems page that sounds like what you are describing?)

cheers
Bruce