Hello Community,
I have a question with my code and wondered if anyone can help with it?
I have a created a “fsli_category_array” to show a series of accounts’ names and each account matched with a key in the “key_array”, please see the array codes in the screenshots.
Now, I want to have a input cell to show the account’s name “fsli_category_array” as a default name, and make cell who have the same key, to automatically show the same overridden names. E.g., if my key “fsli_001” shows the overridden name of “Cash”, the other input fields with key “fsli_001” should show “Cash” as well.
This is my table codes, please see the 2 bold lines, I tried to capture the adjust_account_key and used this [adjust_account_key] in my input fields as {% input custom.unadjusted_misstatement_account.[adjust_account_key] default:fsli_category_to_show %} but the table not works properly now, could you please advise where is wrong in these 2 lines?
{% newline %}
{% assign accounts_selected = period.accounts.include_zeros | range:additional.journal_entry %}
{% for account in accounts_selected %}
{% capture journal_description %}{{ additional.journal_description | replace:" “,”" | replace:".","" | replace:"’","" }}{% endcapture %}
{% capture account_key %}key_{{ account.id }}{{ journal_description }}{% endcapture %}
** {% capture adjust_account_key %}key{{ account.id }}_{% endcapture %} **
{% assign journal_account_number = account.number %}
{% assign fsli_category_to_show = ‘’ %}
{% assign bs_category_to_show = ‘’ %}
{% for item in keys_array %}
{% assign acc_collection = period.accounts.include_zeros | range:mapping_array[forloop.index0] %}
{% assign fsli_category = fsli_category_array[forloop.index0] %}
{% assign bs_category = bs_category_array[forloop.index0] %}
{% for account in acc_collection %}
{% if account.number == journal_account_number %}
{% assign fsli_category_to_show = fsli_category %}
{% assign bs_category_to_show = bs_category %}
{% endif %}
{% endfor %}
{% endfor %}
|
| {% comment %}{{ fsli_category_to_show }}{% endcomment %}{% input custom.unadjusted_misstatement_account.[adjust_account_key] default:fsli_category_to_show %}
|
|
{% if bs_category_to_show == ‘current_assets’ %}
{{ custom.debit.[account_key]-custom.credit.[account_key] | currency_dc:0 }}
{% assign tot_curr_assets = tot_curr_assets+custom.debit.[account_key]-custom.credit.[account_key] %}
{% endif %}
Much appreciated!
Flora