How to use a select to both save an ID in Xano and perform a frontend calculation

Hello !

I’m building a form in WeWeb to create invoices. In this form, the user selects a VAT rate using a select field. My goal is twofold: I want to calculate the total amount (TTC) on the frontend using the VAT rate (TTC = HT * (1 + VAT/100)), and at the same time save the selected VAT rate’s ID in Xano, to link it properly in the database.

I created a workflow on the select field to store the selected value in a variable. If I set the value of the options to the ID, saving to Xano works fine, but I can’t access the actual VAT value for the frontend calculation. If I instead set the value to the real VAT rate, I can do the calculation, but I lose the ID needed for Xano. So I’m stuck: it works for one purpose or the other, but not both at once.

Does anyone have a solution ? Thanks for your help! :blush:

Hi Jojo and welcome to our community :waving_hand:

Can you record a video showcasing your issue?

I’m not sure I understand it completely.