Jump to content
  • 0

SOLVED How handle number localization with parameters


vidierre

Question

I have the classical invoice structure with two datapages: one for the invoce data and the other for invoice details. The second one allow me to make top insert of details.

3d UPDATE: Triggers  works as designed  ------------------------------------------------------ vvvvvvvvvvv

The data processed by a triggered action is taken from the table. And in the table, it is stored in US format (comma separated). 

All localizations handle only the way dat are displayed.

3d UPDATE: Triggers  works as designed  ------------------------------------------------------ ^^^^^^^^^^

2nd UPDATE: this issue is over changing the javasrcipt receiving the data, the trigger one is still in place  ------------------------------------------------------ vvvvvvvvvvv

I whish to initialize at the beginning the top "IMP. UNIT" field value with the total contained into the "Tot. no IVA" field into the invoice (PAY ATTENTION I don't need/want to calculate the total and add it to the invoice, is a sort of viceversa) .

Forum-00.png

Using parameters and a little bit javascript into invoice details Datapage I can almost do it, but the issue arise with localization. I have the Italian localization on both datapages using comma (,) as decimal separator.

The web page containning the two datapages is called in this way from a third datapage:

[@app:URL_root]/fatture-modifica/?ftt_id=[@field:ftt_id]&ftt_tot_noiva=[@field:ftt_tot_noiva#]

where:

ftt_id is the invoice number 
ftt_tot_iva is the numeric field

This lead to call the page in this way:

[@app:URL_root]/fatture-modifica/?ftt_id=5QPMRYIVEO2U&ftt_tot_noiva=166%2C09

BUT the %2C is not understood and this lead to a NaN value into the "IMP. UNIT." field 

 I manually change into the url the %2C (the , value) with %2E (the general accepted . value for decimal separation), all works fine and the IMP. UNIT. field is initialized correctly with the number 166,09  (YES if I pass the period the datapage then localize it with comma).

It seems to me a CASPIO bug, but tow can I workaround this? It is not a bug and is detailed anywhere?

2nd UPDATE: this issue is over changiing the javasrcipt receiving the data, the trigger one is still in place  ------------------------------------------------------ ^^^^^^^^^^^^^^

 

1st UPDATE: The same misinterpretation of localized number there is into Trigger. In the invoice table I have a trigger that concatenate supplier name, invoice number and total amount. The result is displayed with period instead of comma. You can see here in the title I have 1220.000 instead of 1200,000

Screenshot-2021-10-12-at-11.44.52.png

 

Edited by innov2e
Added trigger info
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...