zOpenRelatedChild

Phạm vi áp dụng

✅ Bravo 8 · ✅ Bravo 10

Ý nghĩa

Khai báo biểu thức điều kiện để cho phép hiển thị nút + mở bảng con của bảng hiện tại.

Cú pháp

<Item_Ten_Grid>
  <DataMember>Gia_tri</DataMember>
  <zOpenRelatedChild>Bieu_thuc_dieu_kien</zOpenRelatedChild>
</Item_Ten_Grid>

Ví dụ

Editor phiếu chi — ở grid chi tiết, hiển thị dấu + để mở bảng cháu chọn chứng từ thanh toán khi dữ liệu thỏa mãn:

<Items>
  <Item_Detail>
    <DataMember>Ct0</DataMember>
    <zOpenRelatedChild>!Empty(CustomerCode) AND !Empty(OriginalAmount9) AND
      Empty(IsPrepayment) AND
      CASE(DocGroup,0,CustomerCreditAccount,CustomerDebitAccount)=1
    </zOpenRelatedChild>
  </Item_Detail>
</Items>

Vì sao cần?

Tránh cho người dùng mở bảng cháu khi dữ liệu chưa đủ điều kiện — VD chưa nhập mã đối tượng thì không thể chọn chứng từ thanh toán.

Liên quan

Grid - Tổng quan · ParentTable / ParentKey / ChildKey · Expr · dataRelationMode