cannot filter the same order no inside the same table
yonhantdaenta89@hotmail.com
Member Posts: 52
Hi All,
i am having issue here.
i have one page which contain lots of data, an i need to filter inside the table which is not the same as the previos one
for exmaple
Entry no. Order no Desc
1 123 abc
2 123 def
3 234 xxx
4 234 yyy
my case is that i need to change 'xxx' into 'abc'.
i have trigger something and declare a record variable (t1) of the same table that will go like this
t1.reset;
t1.setfilter("order no",'<>%1'"order no")
if t1.findfirst then
mofidy the desc
but my order no will not go to 234, it sticks to 123. can you please help me what is missing ?
thanks,
i am having issue here.
i have one page which contain lots of data, an i need to filter inside the table which is not the same as the previos one
for exmaple
Entry no. Order no Desc
1 123 abc
2 123 def
3 234 xxx
4 234 yyy
my case is that i need to change 'xxx' into 'abc'.
i have trigger something and declare a record variable (t1) of the same table that will go like this
t1.reset;
t1.setfilter("order no",'<>%1'"order no")
if t1.findfirst then
mofidy the desc
but my order no will not go to 234, it sticks to 123. can you please help me what is missing ?
thanks,
0
Comments
-
I'm not sure if i get it right what you want to do.
You want in a Page trigger to set a filter on the Record Variable that you created that is the same table like the Source Table of the page? and if you find the Record then you want to modify a field?
0 -
0
-
Can you post more detials?
Table with all Fields
Field that you want to modify and how
Trigger you use on the Page
0 -
i am using custom table. i have that kind of structure data like describe above. i just can't filter the order no as '<>' as the cursor order no. seems that the ID won't "go down"
0 -
Hi,
To modify [Desc] for 1 record, your code should look something like this... perhaps you missed something?
Or you mean to do something else?t1.RESET; t1.SETFILTER("Order No.", '<>%1', Rec."Order No."); IF t1.FINDFIRST THEN BEGIN IF tl.Desc <> 'abc' THEN BEGIN tl.Desc := 'abc'; tl.MODIFY; END; END;\\The truth exists in seven versions.1 -
The Code is wrong. You need to use T1.setfilter("order no",'<>%1,'"order no"); you missed one , between '<>%1' and "Order no"0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
