Set Property

ShonatinaShonatina Member Posts: 114
Hiya.. :)

i have created an global variable called ColmNo as integer. And i have a table with various fields. what i want to know is how to set the colmNo for each field. like if my table has 4 fields say FIELD1,FIELD2,FIELD3,FIELD4 then i want to assign the ColmNo has this,

FIELD2 := ColmNo 1;

FIELD3:= ColmNo 2;

can anyone guide me in this :?:

Thanks :D
smile always
shona
That which you seek inside is that which you find outside

Comments

  • lvanvugtlvanvugt Member Posts: 774
    Hi Shona,

    I do not fully grasp what your trying to achieve. Could you elaborate a bit more how? What would be your end result? (You might make some kind of mock-up using Excel and make a screen shot.)
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • ShonatinaShonatina Member Posts: 114
    i cant seem to attach any file to this post! says "The file is too big, maximum allowed size is 1 MiB.Your message contains too few characters."

    Anyways my requriment is like this.....i have a form which picks up value from another and on changing this picked up value the color wil change!

    So i have kept a button called default and an global var ColmNo as int, What i want is , on clicking the default button after selecting an colmNo, the value in that field should revert back to its original one(the one which was there before changing it).

    Thanks
    smile always
    shona
    That which you seek inside is that which you find outside
  • lvanvugtlvanvugt Member Posts: 774
    OK, I am getting a better picture.

    Some questions:
      Your list will have multiple lines (i.e. records)?
      If so, should for all these lines, when pushing that default button, the value in the 'selected' column be reverted, or only for that record?
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • ShonatinaShonatina Member Posts: 114
    lvanvugt wrote:
    OK, I am getting a better picture.

    Some questions:
      Your list will have multiple lines (i.e. records)?
      If so, should for all these lines, when pushing that default button, the value in the 'selected' column be reverted, or only for that record?

    yes you are right my form does have multiple lines,thats why i have kept 2 text box under my form....one is entry no(which is mapped to the forms entry no) so that it know which line 'm refering to. Another text is this ColmNo. So if i give entry no =2 And ColmNo = 4, then press default buton it will know what to change right. this is what i thought....
    thanks
    smile always
    shona
    That which you seek inside is that which you find outside
  • ShonatinaShonatina Member Posts: 114
    mucas wrote:
    i have kept a button called default and an global var ColmNo as int, What i want is , on clicking the default button after selecting an colmNo, the value in that field should revert back to its original one,for futher information regarding brandy, please refer to:
    http://www.brideswardrobe.com/7-wedding-dress

    what is this? what exactly are you trying to say?
    smile always
    shona
    That which you seek inside is that which you find outside
  • lvanvugtlvanvugt Member Posts: 774
    [Hey, that spam post has disappeared!]

    No clear answer yet to the second part of my second question:
    If so, should for all these lines, when pushing that default button, the value in the 'selected' column be reverted, or only for that record?
    So do you want to reset that field for all records or only for the selected?
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • ShonatinaShonatina Member Posts: 114
    lvanvugt wrote:
    [Hey, that spam post has disappeared!]

    No clear answer yet to the second part of my second question:
    If so, should for all these lines, when pushing that default button, the value in the 'selected' column be reverted, or only for that record?
    So do you want to reset that field for all records or only for the selected?

    only the selected ones. like line 2, colmNo 3....this is very specific :) right.
    thats what i want :)
    smile always
    shona
    That which you seek inside is that which you find outside
  • lvanvugtlvanvugt Member Posts: 774
    I do not thinking coding this would not be the challenge as such. It's more about knowing what the previous value was. Once a field value has been changed and validated NAV is not aware of the previous value of that field. So you first should set up a mechanism that would hold this previous value for every (relevant) field in every record.
    Of while you are editing a field value (before validation has occured) NAV still holds the previous value, but this only applies to that one record.

    Do you really want to go this way?

    An additional question would then (also) be: how many version back do you want to go?
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • ShonatinaShonatina Member Posts: 114
    the values which appear on the form on selecting complexity(which is an option field) are picked up from an table. so this table will have the values to which i want the present form to revert back!

    am i making sense?
    smile always
    shona
    That which you seek inside is that which you find outside
  • lvanvugtlvanvugt Member Posts: 774
    Shonatina wrote:
    am i making sense?
    I guess so. :lol:
    On the main form (where you want to implement your feature on) you have the availibilty over the Rec (system) variable that contains the data of the current (selected) record.
    next to that you need to define another variable (of type Record) that is linked to the supplemental table containing the options. Or as you describe, the ...:
    Shonatina wrote:
    .. table [that] have the values to which i want the present form to revert back
    Let's call this variable supTab.

    Your code (in the OnPush-trigger of the button) could be something like this:
    IF supTab.FINDFIRST THEN BEGIN
      Rec.Complexity:= supTab.Complexity;
      Rec.Modify;
    END
    
    Makes sense?
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • ShonatinaShonatina Member Posts: 114
    yeah...think so.
    but where in the code do i specify the line no and colmno? thats important in reverting back the value right?
    smile always
    shona
    That which you seek inside is that which you find outside
  • lvanvugtlvanvugt Member Posts: 774
    Well if the user selects the line for which a 'column' value should be reverted the (systme) variable Rec is the 'line pointer' you are looking for.
    Regarding the column: I understood you would have a designated button for a specific column (i.e. field), but maybe I misunderstood. If I misunderstood I do not have a direct solution for that (as I never have built code for that). But you might have a look in the C-SIDE Reference Guide on FIELDNO.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • ShonatinaShonatina Member Posts: 114
    lvanvugt wrote:
    Regarding the column: I understood you would have a designated button for a specific column (i.e. field), but maybe I misunderstood. If I misunderstood I do not have a direct solution for that (as I never have built code for that). But you might have a look in the C-SIDE Reference Guide on FIELDNO.

    No..i have created a global variable called ColmNo as int, and mapped it to the textbox i placed at the bottom of my form in the designer.

    In the command button default, i need to call this colmno in through codes, so that when i change the colmno and press default it will change the value respectively!....
    thanks :)
    smile always
    shona
    That which you seek inside is that which you find outside
  • SavatageSavatage Member Posts: 7,142
    I've read this more than once and I still have no idea what you're trying to do. In resepect to columns. columns in nav can be moved around. If you're looking to identify specific fields you should see the fields "ID".

    If you have a gmail account you can post your screenshot there and use a link. else screenshot to paint & save as JPG and attach it to the post.
  • ShonatinaShonatina Member Posts: 114
    hi harry,
    smile always
    shona
    That which you seek inside is that which you find outside
Sign In or Register to comment.