Thank you for your response. I am trying to group by Client Name so I can see all the invoices that are outstanding without using the filter/sort option.
Hope you’re well! I wanted to start off by saying a big thank you for all the help you’ve given me recently. It’s been incredibly helpful.
I’m reaching out because I’ve stumbled upon a little issue with the code and could use your insight. It seems to have a blind spot when it comes to recognizing changes in a cell. For instance, when I update the exchange rate, which should alter the payable amount, the custom code doesn’t seem to pick up on it.
It feels like whenever there’s an update in the table, the code doesn’t respond accordingly. Have you ever encountered something like this?
Any advice or suggestions would be really appreciated. I’m trying to figure this out and thought you might have some ideas.
Thanks again for all your help – it means a lot!
Any tricks or tips you have would be super appreciated. I’m a bit stumped here and could use some of your coding magic.
I’ve been able to get totals to work for my non-currency field!! A key tweak was I needed this:
parseFloat(priceString.substring(1)
to be this:
parseFloat(priceString.substring(0)
I’m so grateful of this code you shared. I’m now trying to create a second “button” that shows a second total in the same flexbox. Could you help me by showing what parts of the code need to be renamed to allow a second total of a different column?
Hello colleagues, I have this code and it works. But the question is how to modify it so that it does not count the values in the field from the table, but provides a single value from the field in the list-details component:
<div class="subtotal-container">
<span>Suma Ilości Przyjętej:</span>
<button class="subtotal_value">0</button>
</div>
<style>
.subtotal-container {
display: flex;
align-items: center;
justify-content: flex-end; /* Align to the right */
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
background-color: #f0f0f0;
}
.subtotal-container span {
font-weight: bold;
margin-right: 10px;
}
.subtotal-container button {
background-color: #645d67;
color: #fff;
border: none;
border-radius: 5px;
padding: 5px 10px;
cursor: pointer;
}
</style>
<script>
window.addEventListener('get-records-table2', (data) => {
let totalSum = 0;
if (data.detail) {
data.detail.forEach(item => {
let amountString = item.fields["Ilość Otrzymana"];
let amountInt = parseFloat(amountString);
if (!isNaN(amountInt)) {
totalSum += amountInt;
}
});
}
document.querySelector(".subtotal_value").innerText = totalSum;
});
</script>
Thank for your answer
THanks for the Code which I just tried.
It works Great except it is not sticking to a 2 decimal place monetory format and sometimes the retults looks like £1255.23 99 99999 99
I dont know Java at all well, any help would be much appreciated.