Hi,
I’m using the TupleExtLookup for getting an amount out of a JSON string but I’m getting the following error:
in the following POST body:
These are the components that I’m using:
This is the For Each
TypeCode Plugin Configuration:
TypeCode parameters:
Amount Plugin Configuration
Amount parameters
The trace I’m getting:
The weird thing is, this has worked before. I can’t figure out why it doesn’t work anymore.
I’m probably looking over something small
Hi,
Interesting case…
I quickly looked into it and I suspect that the issue comes from the fact that you get a Float value (that is what the serialized request parameters spit out), however you’ve defined MoneyEUR as expected typehandler for the value in the “Look up amount” action.
IMO this should be supported scenario out of the box.
For now, I would suggest to change the MoneyEUR to Float → then if you cannot use the float, you could probably cast it like so:
The other way around (from money to float) would be something like this probably:
In the meantime I will discuss internally what should happen with this case.
Greetings,
Miroslav
1 Like
Hi Miroslav,
This worked for me. Thanks for the quick reply!
Greetings,
Timothy
For you interest,
PI54009 - Tuple lookup with expected type Money does not accept float
for the product TupleExtensions and has been added to the plugins team backlog.
In short the idea is that we introduce some kind of “smart conversion” that is enabled by default (optionally disabled, if you want to be strict with the type handling), that at least should address the case above, without the need to change your lookup from Money to Float (since Money objects can be constructed from a Float number)
Greetings,
Miroslav
1 Like