FetchingColumnList
Phạm vi áp dụng
✅ Bravo 8 · ✅ Bravo 10
Ý nghĩa
Khai báo đích danh cột cần tải dữ liệu — ngoài những cột khai báo hiển thị ở layout.
Vì sao cần?
Cơ sở dữ liệu ở Explorer chỉ load những cột khai báo hiển thị ở layout. Khi biểu thức trong Expr của CommandValidators cần truy vấn đến cột không được hiển thị, giá trị sẽ không được tải từ server lên → phải dùng
FetchingColumnList.
Cú pháp
<ParentTable>
<FetchingColumnList>Danh_sach_cot</FetchingColumnList>
</ParentTable>Ví dụ
Template chứng từ — cấm đình chỉ chứng từ không hợp lệ:
<DataSource>
<Tables>
<ParentTable>
<FetchingColumnList>BranchCode</FetchingColumnList>
<CommandValidators>
<Delete>
<CommandName>Delete</CommandName>
<Expr>BranchCode=BRANCH() AND ((!(USER('UsingLockDate')=1 AND
!EMPTY(USER('LockDate'))) AND ISFISCALDATE(DocDate) AND ISNULL(Lock, 1)=0)
OR (USER('UsingLockDate')=1 AND !EMPTY(USER('LockDate')) AND
DocDate>USER('LockDate') AND ISNULL(Lock,1)=0 AND
(DocDate>=FISCALYEAR('StartDate')) AND
(DocDate<=FISCALYEAR('EndDate'))))</Expr>
<Text>
<Vietnamese>Không được đình chỉ dữ liệu không thỏa mãn.</Vietnamese>
<English>Data is not allowed to change the inactive state.</English>
</Text>
</Delete>
</CommandValidators>
</ParentTable>
</Tables>
</DataSource>Diễn giải: biểu thức trong Expr so sánh với cột BranchCode, nhưng cột này không được khai báo hiển thị ở Explorer của các chứng từ → phải khai báo <FetchingColumnList>BranchCode</FetchingColumnList> để tải dữ liệu cột này.
Liên quan
CommandValidators · Bắt đầu với Explorer · Template · Bắt đầu với Expression