I am using the bellow template.
If I add an attachment or a description the lines gets reconciled.
If I delete the text or remove the attachment the lines remains reconciled unless i delete entire row.
Can it be set up so it turn red when someone just deletes only the text from description of the attachment by mistake?
Can it be setup to turn red if is missing both the attachment and the description?
This attribute makes sure the template becomes unreconciled in case a certain input field hasn’t been filled by the user. An attachment also qualifies as an input field.
You can apply this feature for each input tag you want. Example:
The required attribute will set the entire template to red without the need for a specific indicator somewhere in your template. So you might consider to remove the indicator you are using currently, as the template indicator (on top next to the template title) already functions as such.
Does this help you? Otherwise don’t hesitate to ask.
Thank you for your explanation. I was not aware of that attribute but i will definitely use it in the future.
For the above code. If I remove both the attachment and the description the the reconciliation does not change it status. ( screenshot 1)
Only if I delete the row using the trash icon it appears as unreconciled. ( scrrenshot 2)
Is there a way to prevent this from happening ( I mean appear reconciled even if attachment and description are empty) ? Or do I need always to delete the row ?
Is that really what you want to go for? It seems to me that within the function/goal of your template, it is needed to have both a description and attachment, right?
So we’d propose to make those inputs as required. You can do it with an indicator, but:
A/ that seems a bit of an overkill visually (as the indicator cannot be linked visually to both inputs)
B/ you’d need to create additional coding, as you’d create a variable depending on the outcome of those 2 inputs
Let us know what you’d think; happy to help out further
Okay, but you’re still not using the required attribute… It would be better to add those, instead of using the indicator. Is there a specific reason why not to use the required attributes?
In your current code the indicator is even dependant on the amount of attachments or descriptions added, so this piece of code isn’t even looking at a specific input (description OR attachment):
above code is basically saying: as soon as you have added at least one description or attachment, the template should reconcile. But that’s not what you want, and you are complicating the code a bit while it could be used way more efficiently with the required-attribute:
I have tried to do what you have suggested but it seems to have the same behaviour.
Even if I deleted the text inside the Description box the the indicator is still green.
Am I doing something wrong ?
The assign of the unrec_argument nested within the for-loop and if-statement, should be 1 (= not reconciled). In the base case (just before the loop), the unreconciled argument should be 0. In your code snippet, these appear to be swapped, making the base case ‘unreconciled’ and the conditional case ‘reconciled’.
I have swapped them.
If those are not swapped the indicator is green even when there is no information added in either the attachment or description field.
@Stefan.Temelie, that only applies in case there are no lines in your fori loop. Note that you always see one ‘input line’ but that still means there are 0 lines in your loop. I may have wrongly assumed that no lines also means it is ok/reconciled, and only an empty line with either one of the inputs missing should lead to an ‘unreconciled’ indicator.
It is possible however to also make the base case for unrec_argument conditional. For instance by replacing it with: