I want to the change the value of same tag in a single document at runtime
for example :-
Schedule_1 : A
Schedule_1 : B
Schedule_1 : C
Schedule_1 : D
Discussion posts and replies are publicly visible
I agree with Stewart here.
It's much easier to have it as ONE tag at least for this part of your document, and prepare this in a rule where you could play around easily with what data to put when one product is not available
i already made rule
but while placing tag value in the document how to identify the no of count of that tag in a document
Why do you need to identify the "no of count of that tag in a document"? If you generate the content to include the labels, the values for those labels, and any newlines required between each content item then your tag will simply be replaced wiht the entire formatted content you've generated in your rule.
Hi Stewart Burchell Actually, the scenario is if the customer has used the tags like as following in document which has multiple pages and multiple number of tags have been used throughout the document. Then suppose there are 4 schedule tags in the current scenario,###Schedule_1### should be replaced with the value: Schedule A when it occured first time in the document,The very next time ###Schedule_1### is found, the value should change from Schedule B, and then the next time ###Schedule_1### should be Schedule C in the document.In short, the number of occurences of the tag in the document will dynamically decide the value against the tag that needs to be replaced.Is is possible?
Is there static content between the various tags that you mention? If so I still think you will find this easier to assemble as one piece of content in an Appian rule 9or set of rules) and then have a single generic tag in your document that gets replaced by the content you've dynamically constructed in your code.
The content generation is dynamic and we do not know the sequence/number of tags in a document.
Is your document a plain text one ?
If yes, one way you could achieve this is by reading the data in the document and apply a logic to replace the tags by your replacement values in an expression rule and then create that as a document.
Off course, you should consider this from a performance standpoint depending on the size of your document
Then I would construct the content dynamically within an Appian ruleset, and dump the final output to your Word document through a single tag. You could think of your tag as a placeholder for the entire document you're wanting to generate.
Stewart Burchell said:dump the final output to your Word document through a single tag
This is what I was thinking of as well. I've done it before and once you deal with a few preliminary challenges, the rest is pretty easy to handle, and it opens up the ability to build and parse custom templates (as long as the user creating the template strictly follows whatever replacement logic you dictate).
© 2022 Appian. All rights reserved.