I just add a script in the field("EndingFlag") as below and while I save the DocDef , it pop up the following message.
"There is a cycle in the form calculation dependency graph.Calculation cannot be performed.See 'Line Number Rule Chain','LineDataRulesChain'"
I try to search the suggested keywords but it show no article for me.(See attached)
Anyone can help on this?
<Code Start>
int PageCount=Context.Field("PageNumber").Items.Count;
string tempPageNumber=Context.Field("PageNumber").Items[PageCount].Text;
string abc=Context.Field("EndingFlag").Text;
string tempAccountNumber=Context.Field("AccountNumber").Items[PageCount].Text;
string tempSubAccountType=Context.Field("SubAccountType").Items[PageCount].Text;
string tempCurrency=Context.Field("Currency").Items[PageCount].Text;
//If the "ENDOFSTEMANET" exists on the last page, and the following fields(AccountNumber,SubAccountType and Currency) are not Blank.
//then set all fields as .Verified=true
if (abc=="ENDOFSTATEMENT" )
{
if (string.IsNullOrEmpty(tempAccountNumber))
{
if (string.IsNullOrEmpty(tempSubAccountType))
{
if (string.IsNullOrEmpty(tempCurrency))
{
///Use multiple if loop just becasue the AND operator(&&) doesn't work
Context.Field("AccountNumber").Items[PageCount].IsVerified = true;
Context.Field("SubAccountType").Items[PageCount].IsVerified = true;
Context.Field("Currency").Items[PageCount].IsVerified = true;
Context.Field("TotalWithdrawals").Items[PageCount].IsVerified = true;
Context.Field("TotalWithdrawalsLines").Items[PageCount].IsVerified = true;
Context.Field("TotalDeposits").Items[PageCount].IsVerified = true;
Context.Field("TotalDepositLines").Items[PageCount].IsVerified = true;
}
}
}
}
<>Code End>
コメント
3件のコメント
Hello,
The error message draws your attention that there are cycle dependencies in the rules' chains. We cannot see the full context without knowing what are other scripts involved in chains and how they modify the fields in question, so if you will not be able to find the source of the error, please send us the whole project, not only the single script rule.
Hi Ekatrina,
Thanks for your help on this, May i know which way to pass you the project would be better?
Hello,
Please upload the project and samples archived with password-protection on any file storage by your choice (for example, it may be dropbox), and then send us the link and the password by private message on this forum.
サインインしてコメントを残してください。