Announcement

Collapse
No announcement yet.

about sc_field_disabled

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

  • about sc_field_disabled

    I usually use sc_field_disabled like this:

    sc_field_disabled("field1;field2;field3;");

    And it works fine before, today I found there's error in application and cannot open the web page any more, after 10+ times debug, I found the problem: drop the ; in the end, and like this:

    sc_field_disabled("field1;field2;field3");




    You guys sometimes really make me nothing to say.

  • #2
    Good find.. I didnt know this. Thanks.

    Comment


    • #3
      I'm using sc_field_disabled for the first time.

      I set it in the onLoad event, but the fields are disabled only when I navigate to the next record??
      In the same onLoad event there are some sc_btn_display("Button_Name","off") lines that work perfectly when the form is loaded.

      Any idea??

      Comment


      • #4
        do it in the onapplicationinit event.

        Regards

        Comment


        • #5
          @kafecadm
          according to the SC documentation sc_field_disabled in forms can be used in onLoad or onNavigte events only.

          But the major issue seems to be in general when events occour in relation to when the data is updated in the {fieldname} and\or [var] variables.

          E.g.

          I just tried this in a single record form:
          Code:
          
          field1 <-- any field from the db table used by the form
          
             \- field general setting: 
                    - Save Variable: yes
                    - Variable Name: myvar
          
          filed2  <-- created in the form
          
             \- field general setting: 
                    - Data type: label
                    - Text     :[myvar]
          Now, while I would expect field1 and field 2 to show exactly the same content always, when I navigate the form field 2 always show the field content of the previous record, except at startup when it's empty

          RECORD1
          field1: 1
          field2: empty <-- shouldn't this be 1?

          RECORD2
          field1: 2
          field2: 1 <-- shouldn't this be 2?

          RECORD 3
          field1: 3
          field2: 2 <-- shouldn't this be 3?

          end so on...

          Can anyone explain to me why?
          Last edited by robydago; 02-19-2015, 09:11 AM.

          Comment


          • #6
            @robydago

            Man I'm aware of what SC documentation says. but:



            I've done it before that's why I told you to try it.

            On the other hand i do apologize since I don't get what you mean with your last example.

            Regards

            Comment

            Working...
            X