Announcement

Collapse
No announcement yet.

field name passed as variable to "sc_field_display"

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

  • field name passed as variable to "sc_field_display"

    hello,
    i have to build a grid with 5 fields between 10 dynamically ; in the original SQL select i have all the 10 fields, but in runtime i have to hide some ones wich are in a variable global [field_list_to_display] used in OnScriptInit event
    I have tested the "sc_field_display" macro it works when i put the field name value (for example sc_field_display("name",off) but when i try to pass it with variable like this:
    $s="name";
    sc_field_display($s, off);
    it dosent work

    some one can help me

  • #2
    Use SC's local field variables format to refer to fields; which you specify inside "{ }". So, when you want the "name" field hidden:

    sc_field_display({name}, off);

    Comment

    Working...
    X