Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Word Field referencing giving: Error! Reference source not found., #578

Open
lcpprop opened this issue Jan 8, 2025 · 0 comments
Open

Word Field referencing giving: Error! Reference source not found., #578

lcpprop opened this issue Jan 8, 2025 · 0 comments
Labels

Comments

@lcpprop
Copy link

lcpprop commented Jan 8, 2025

I am creating a Word template for lawyers, so the whole Word document consists of nested lists with each list representing legal clauses ex: 1.1, 1.2, 1.3, 2.1, 2.1.1, 2.1.2, etc. Inside each clause I could have jinja conditions ex: "2.4 Include a {% if deposit %} deposit {% endif %}". I also use Word fields to refer to other clauses ex: "3.1 As stated in clause 2.4 we should ..." . I am using Word fields to refer to other clauses, because sometimes you might not have one clause ex: 2.3, which means that clause 2.4 becomes 2.3, so you want to reference clauses dynamically

Problem:

If I reference a clause using Word Fields that contains conditionals within it (ex: 1.1 Include a {% if deposit %} deposit {% endif %}), then it's Field reference would change, which would make the place I am referencing this clause have an "Error! Reference source not found".

So, my template would look like this:

2.4 Include a {% if deposit %} deposit {% endif %} - Field reference: AA1

3.1 As stated in clause 2.4 [FIeld reference underneath: AA1] we should

The generated document would have this:

2.4 Include a {% if deposit %} deposit {% endif %} - Field reference: AA2

3.1 As stated in clause "Error! Reference source not found" [FIeld reference underneath: AA1] we should

Please help me fix this error.

I do not know what is the best solution here, but possible ones might include: stopping the Word Fields from updating when the conditional statements change the value of the clause or update not only the field reference, but also any places where this field is cited with the new reference.

@lcpprop lcpprop added the bug label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant