I have a field in a DataType for Price that is set to FieldType: Number.
This Price then appears in an Input in a Repeating Group with Content Format set to Currency and that works fine.
I have a standalone Input next to that called “Quantity” into which a User types a Number. The Content Format of this Input is set to “Integer”. That also works fine.
I then have a second standalone Input called “Total” in which I’m trying to multiply the Price x Qty but that only works (ie turns ‘blue’) when I set the Content Format to Text. Thing is, I need it to be a Number because I want to perform calculations on it later on but none of the number format options (Decimal/Integer etc) are accepted and I get an Issue flagged that my calculation “should be a number but right now is text”.
Can anyone point me to a remedy for this or suggest what I might have missed to cause this issue?
Many thanks as ever.
Joe
What you’ve described should work as expected, so it seems like you may have something set up wrong somewhere.
Maybe some screen shots of your inputs and RG would shed some light on the issue here.
I think I may have blundered across a solution. My issue was that I had my Total x Price: Formatted as £1,048.96 but when I deleted the “Formatted As” it worked. It seems that was converting the input to Text. Could that be it?
Yes, that will be it.
‘Formatted As’ turns everything into a text, as it’s only used for display purposes.
You can add ‘Formatted As’ to a number AFTER doing calculations, but not before, as doing so turns the number into a text.
That’s very valuable to know. Every day’s a school day!
Thank you so much for your time.
Have a great day!