简体   繁体   English

Adempiere 隐藏/显示字段基于使用显示逻辑在客户端窗口中选中或未选中的刻度线

[英]Adempiere Hiding / Showing Field Based on tick mark checked or unchecked in client widnow by using display logic

I am working with adempiere, I would like to Hide/Show field of a window based on tick mark available in another window Client which is (AD_Clinet table).我正在使用 adempiere,我想根据另一个 window 客户端(AD_Clinet 表)中可用的刻度线隐藏/显示 window 的字段。 Eg I created barcode field in Material Receipt window which i would like to show only when Client screen Scan Barcode On Material Receipt is tick marked.例如,我在材料收据 window 中创建了条形码字段,我只想在客户端屏幕扫描材料收据上的条形码被打勾时才显示。 I am using Display logic of window Tab Field > Tab > Field,following things are tried by me我正在使用 window 选项卡字段 > 选项卡 > 字段的显示逻辑,以下内容由我尝试

  1. AD_Client.Is_ScanBarcodeMaterialReceiot AD_Client.Is_ScanBarcodeMaterialReceiot
  2. Barcode_Field= @SELECT Is_ScanBarcodeMaterialReceiot FROM AD_Client WHERE AD_Client_ID=@#AD_Client_ID@@ Barcode_Field= @SELECT Is_ScanBarcodeMaterialReceiot FROM AD_Client WHERE AD_Client_ID=@#AD_Client_ID@@
  3. @Barcode_Field=AD_Client.Is_ScanBarcodeMaterialReceiot@ @Barcode_Field=AD_Client.Is_ScanBarcodeMaterialReceiot@

I didn't got proper output for that.我没有得到合适的 output 。

Please provide suggessions to solve out this problem.请提供解决此问题的建议。

The display logic in ADempiere does not support sql statements. ADempiere 中的显示逻辑不支持 sql 语句。 You can use the SQL in a virtual column and then reference that column in your display logic.您可以在虚拟列中使用 SQL,然后在显示逻辑中引用该列。

So add a Yes/No virtual column to the table with the sql value set to因此,在表中添加一个 Yes/No 虚拟列,并将 sql 值设置为

SELECT AD_Client.Is_ScanBarcodeMaterialReceipt FROM AD_Client WHERE AD_Client_ID=@#AD_Client_ID@

Call this column by the same name Is_ScanBarcodeMaterialReceipt.使用相同的名称 Is_ScanBarcodeMaterialReceipt 调用此列。 Add it to the window/tab but don't display it.将其添加到窗口/选项卡但不显示它。 The value should appear in the context when you open the window.当您打开 window 时,该值应出现在上下文中。

Then you can set your display logic on the bar code field to然后您可以将条形码字段上的显示逻辑设置为

@Is_ScanBarcodeMaterialReceipt@=Y

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM