Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How do I get any webservice date/time into FM var?


This topic is 4357 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Is it possible.. seems like there are other lanuages to do this.. but

I don't want to use a locate clients Get (current ) date time.. I need a external date/time some how

Is there a simple way to GET, import or  use a URL(input) way to acquire a external date/time from a webservice

I looked around..just could find a simple answer staying in FM

Has anyone done this.. if there is single URL... that only shows this?

 

Thanks again...

Posted

their are a couple ways to do this, 1 would be open a website like http://tycho.usno.navy.mil/timer.html in the webviewer  and pull the time from their use

set field [ fieldname; GetAsText ( GetLayoutObjectAttribute ( "webviewername" ; "content") ) ]

to put the website source into a text field and extract the time. 

 

or you can use an xml feed and grab the time. both are relativity simple to do.

if you need help let me know what time zone you need and I will make it for you.

Posted

the current  HOST;;  I don't know the func or use server stuff;;    i would assum the user can just back the host or client data backward.  i want an external reference so to calc a rental process for my app..   be simple    I LIKE THE

Posted

tried to find this??   Would appreciate more help thank you so much

 

i can open URL  see contents on site navy site... and can parse  easily if i can grab date to a field

 

Can't just can't  figure where to find this function      and what about 2 parameters "webviewername" ; "content"

 

 

 

GetLayoutObjectAttribute ( "webviewername" ; "content")

Posted
the layout has 1 object   and its name in  inspector I NAME the object  WebServiceNavy
normally i don't name all objects
 
I am not familiar with, but inspecting Data ...   shows nothing in field name
 
the open webviewer shows the Navy clock data
using DEBUGGER varing the code syntax... fiddling/
I can't get $test data returned?
Anyone see something I am missing
 
TIA
 

post-85391-0-16234800-1355721552_thumb.j

Posted

Okay I got it... done.. play play I will attach a zip. if anyone interested... my way in much longer.. parsing I certainly could have been written niftier/shorter lines etc....this first try.. but it does work, goes out and get a webpage, pase it to anything or now compare  run time to rent time

This topic is 4357 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.