Announcement

Collapse
No announcement yet.

show or hide a field in a grid form

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

  • show or hide a field in a grid form

    Hi
    Iím too stupid for this tool! Since hours I try to find out how to show or hide a field in a grid form.
    The field should be shown if an other field in the same row has an specific value.
    The specific value is shown in the field and coms from the selected table!
    I tried to put following Statement in several Actions:
    -onSricpinit
    -OnFocus
    -onLoad
    -onLoadRecord
    -onNavigate
    /**
    * Hide/show a field
    */

    if ({fragenart} == '2') // Display field
    {
    sc_field_display({Antwort}, 'off');
    }
    else // Hide field
    {
    sc_field_display({Antwort}, 'on');
    }
    The sc_field_display works only my condition is not working!!

  • #2
    Is {fragenart} a string / character field or a numeric / integer field?

    If numeric then lose the quotes around '2' maybe?
    Last edited by adz1111; 11-26-2014, 01:46 PM.

    Comment


    • #3
      You mean that you want to show hide a field per row, depending on a field in the same row? The problem is that you cannot do that because the macro's work on column level, not on record level. Since you are working on a grid you need to use the onrecord to get access to data of that record. You can use the fields then to calculate a custom field. So imho you don't need to use the macro but clear the content of a field depending on the value of another field in the same record?
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        Hi Albert
        Thanks for your last replay on my Question regarding hiding Fields in a Grid!
        Right it’s not possible to hide fields in a malty-row grid, but I found a other solution!
        I’m hiding the fields in a form (editing contend of the row) called from the grid!
        Best regards
        Uwe

        Comment

        Working...
        X