Set Property

Shonatina
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

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

smile always
shona
That which you seek inside is that which you find outside
shona
That which you seek inside is that which you find outside
0
Comments
-
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.)0 -
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).
Thankssmile always
shona
That which you seek inside is that which you find outside0 -
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?
0 -
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....
thankssmile always
shona
That which you seek inside is that which you find outside0 -
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 outside0 -
[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?0 -
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?
only the selected ones. like line 2, colmNo 3....this is very specificright.
thats what i wantsmile always
shona
That which you seek inside is that which you find outside0 -
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?0 -
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 outside0 -
Shonatina wrote:am i making sense?
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
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?0 -
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 outside0 -
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.0 -
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!....
thankssmile always
shona
That which you seek inside is that which you find outside0 -
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.0 -
hi harry,smile always
shona
That which you seek inside is that which you find outside0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions