You may come across a situation, where you may want to link or ‘order by‘ with different tables. X3 has the solution for the scenario and it will help us to get the value from linked tables and able to sort by descending and ascending order on each field. Please refer the below screen shot to get better understanding,
New stuff: How to setup timeout in X3 and stop executing the code when timeout occur…?
Description of Screen shot:
• STO1 is alias of First table
• TLO1 is alias of Second table
• Link the both tables with proper Key/Index with alias name [STO2]
Link [STO1] With [TLO1]TLO0=STOFCY;LOCTYP As [STO2]
• Now use the where clause to filter the First table include the order by clause too
Filter [STO2] Where ITMREF=’33301′ & STOFCY= ‘P33′ Order By [TLO1]LOCTYP Asc;[STO1]LOC Desc
• Please note here, we should mention the actual table name with field in the order by clause, so it will not conflict the ambiguous column name.
• Finally we got the data from both tables after filtered and sorted,
Infbox num$([F:STO1]STOCOU) # data comes from First table
Infbox num$([F:TLO1]LOCTYP) # data comes from Second table
Also read:
1. Creating a directory Programmatically in X3
2. ‘Identify’ in x3
3. Multi-Tier Installation of Sage ERP X3
4. Error while importing folder in Sage X3
5. How to change User Login without exiting from the current session