0
I need current currency rate in my field like when user select USD, GBP, INR or any currency so my i can calculate everything in USD but i need currency rate from web
Like

Accepted Answer

Thursday, July 05 2018, 12:54 PM - #Permalink
0
Aayush,

See if this helps.

I created a form action that runs on load as an example and the action is to run a javascript with the following code.

$.ajax(\{ 
type: "GET",
dataType: "jsonp",
url: "http://www.apilayer.net/api/live?access_key=9c9ec0b36075813748ad2015eaf99688&format=1%C2%A4cies=EUR,INR,GBP",
success: function(data)\{
//Need to change to string if setting a text field
var USDEUR = data.quotes.USDEUR;
var strUSDEUR = USDEUR.toString();
SetFieldValue("Description",strUSDEUR)
//If numeric field no need to change type
SetFieldValue("MyNumeric", data.quotes.USDGBP)
}
});


It then looks like the attachment when the form loads. You can obviously tweak this as much as needed.
Attachments:
  • Aayush Arora
    more than a month ago
    Thanks a lot it works like a charm
  • Aayush Arora
    more than a month ago
    The problem which i am facing now is it is showing in preview but not in Form after deployment
The reply is currently minimized Show
Responses (7)
  • Accepted Answer

    Monday, July 02 2018, 10:24 AM - #Permalink
    0
    Just a quick google search showed these two free options but I'm sure there are many others. If you can find a web service or these two give json responses you can use that data in your form. Maybe have a form action run when the form loads to load all the values or have a form action run when the drop down changes to grab the pertinent value.

    https://fixer.io/
    https://free.currencyconverterapi.com/
    Like
    The reply is currently minimized Show
  • Accepted Answer

    Monday, July 02 2018, 11:36 PM - #Permalink
    0
    Like
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 05 2018, 03:34 AM - #Permalink
    0
    Hi

    I need a way to get below data and fill it in form fields like in text field of EUR its current rate and for GBP same.

    Any suggestion how to get this data and feed into my form text field i tried REST Grid but its not displaying data

    http://www.apilayer.net/api/live?access_key=9c9ec0b36075813748ad2015eaf99688&format=1¤cies=EUR,INR,GBP
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 05 2018, 11:45 PM - #Permalink
    0
    The problem which i am facing now is JSON data showing in preview mode but not in form after deployment
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 12 2018, 11:25 PM - #Permalink
    0
    Thanks for finding the "apilayer" web site. I haven't seen that one.

    I don't know about escort service problems (I'm not a politician), but for the web service:
    1. Create a Rest Data source in Composer
    2. Read Don Ingram's article
    3. Write a ModScript to get the data, parse it and do something with results.


    I just did something similar to read Holiday dates from Holiday Web Service and populate a Calendar.
    Like
    • Richard Gering
      more than a month ago
      FYI: I have since removed the escort service problem posting (reply) that Paul was referring to in his reply.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, July 12 2018, 11:29 PM - #Permalink
    0
    Thanks for answer to all I was using HTTP API rather than HTTPS so it was showing in preview mode but not in browser but now i changed it to HTTPS thanks to cindy from microfocus and it works just fine
    The reply is currently minimized Show
  • Accepted Answer

    Monday, July 16 2018, 07:11 PM - #Permalink
    0
    By "preview mode" do you mean Composer's form preview? I'm amazed that would work for anything more than simple layout design.
    The reply is currently minimized Show
Your Reply

Recent Tweets