この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
Hi,
I'm new to Adobe forms and am struggling to write the script for the requirement needed. Any pointers/help would be greatly
appreciated.
Requirement: Only want to display rows that DocumentReferenceID value starts with "009". Note that there will be a total for the amount which starts with "009".
Sample data of rowItemsNode table:-
DocumentReferenceID | ddtlDocumentDate | txtTransactionCurrency | decAmountInTransactionCurrency |
009001 | 26/05/2021 | USD | 100 |
009002 | 27/05/2021 | USD | 100 |
140001 | 28/05/2021 | USD | 300 |
rowItemsNode table
Output that I want:-
DocumentReferenceID | ddtlDocumentDate | txtTransactionCurrency | decAmountInTransactionCurrency |
009001 | 26/05/2021 | USD | 100 |
009002 | 27/05/2021 | USD | 100 |
Total | 200 |
Is the script below correct?
if (Left(Form.bdyMain.frmItems.tblItems.rowItemsNode[*].DocumentReferenceID, 3) == "009");
{
tblItems._rowItemsNode.removeInstance(true);
xfa.form.recalculate(true);
}
Many thanks in advance!!
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
You can use conditional bindings with predicates so you won't need any scripting.
Given your table row "rowItemsNode" now has a binding like $.tableData.rowData[*] you can use a predicate statement within the brackets to filter the data directly when it's merged with template to the form you get rendered on screen.
$.tableData.rowData.[Left($.DocumentReferenceID, 3) eq "009"]
Hi,
You should post this in dedicated AEM Form community to get faster response.
Please check the AEM Forms guide if that help.
AEM Form Community - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-forms/ct-p/adobe-experienc...
Guide - https://helpx.adobe.com/pdf/aem-forms/6-2/formcalc-reference.pdf
You can use conditional bindings with predicates so you won't need any scripting.
Given your table row "rowItemsNode" now has a binding like $.tableData.rowData[*] you can use a predicate statement within the brackets to filter the data directly when it's merged with template to the form you get rendered on screen.
$.tableData.rowData.[Left($.DocumentReferenceID, 3) eq "009"]