Hi Natalie,
yes you can use stored procedures and functions from formatted search.
An example that I've used myself: In Denmark we have another format for numbers than in the US. In the US they write 1,000.00 where in Denmark we write 1.000,00. That means that I was not able to convert the numbers I take from fields in SBO to floats so I can do calculations on them.
To work around that problem I created my own version of cast as follows:
create function mycast (@NumString nvarchar(50))
returns float
as
begin
return ( select cast (replace (replace (@NumString,'.',''),',','.') as float) )
end
This is created in the database once and for all. After that I can use it everywhere including in a formatted search. as seen below
select dbo.mycast('123.456,78') + dbo.mycast('1.234,56')
select dbo.mycast($[$34.0.0]) + dbo.mycast($[£38.0.0])
Hope this helps
Rgds
Jesper Carstensen
Add a comment