Announcement

Collapse
No announcement yet.

Using variables with the macro sc_field_style

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using variables with the macro sc_field_style

    Currently the macro sc_field_style doesn't accept variables. It will be important to be able to pass variables as parameter, specifically the color

    Ex. this code is currently not supported. sc_field_style({Column}, {Color});

    Thanks

  • #2
    I had the same problem but wanted to use anyhow a variable.
    I found a workaround by using first sc_field_style and directly after a piece of generated code. (I think scriptcase should make it possibel as it is not a major change)

    The workaround is :
    $lightred = '#fe6267';
    sc_field_style({testfield}, '#fe6267'); // use any # code
    $this->NM_field_style["testfield"] = "background-color:" . $lightred. ";"; // this is fact a newly generated code , if scriptcase changes this it will not work anymore

    This works only in onrecord of a grid

    regards
    Stephan

    Comment

    Working...
    X