Pull a record from Remote table and add field values to a custom widget.

Afsar2
Tera Contributor

Hi,

Idea is to leverage on Remote Tables.

I am trying to fetch weather related data from an opensource API and create a record in remote table.

I am able to populate the remote table with weather details based on session user's location.

I want to pull this details into custom widget.

The server script in custom widget is not able to fetch glide record from remote table.

Same GlideRecord script is able to fetch data from other tables but fails for Remote Tables.

Any suggestions?

 

Regards,

Afsar Sheikh

 

10 REPLIES 10

Anil Lande
Kilo Patron

Hi,

Can you please share what you have done?

Also share the configuration of your table.

Also check if below decimations is helpful. 

https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/remote-tables/concept/re...

 

Also would like to understand why you are using remote table? instead you can store same information in any custom table and use it on portal.

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Afsar2
Tera Contributor

Hi @Anil Lande ,

I appreciate your interest for looking into this.

I am just leveraging remote tables use case as per docs.

https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/remote-tables/concept/re...

I am trying to to fetch real-time weather data and adding it to the Remote table which is fine.

I am trying to fetch this data in widget server side script.

find_real_file.png

Afsar2
Tera Contributor

I found a great content on "Remote Tables" by @Dirk .

https://community.servicenow.com/community?id=community_article&sys_id=87d00a7edb50f0d092bb0b55ca961...

 

But still my issue not resolved.

I tried querying the remote table using background script, it returns 0 rows.

but there exists a row.

Any suggestion guys?

 

Afsar2
Tera Contributor

I also observed that Glide Query returns record from Remote tables defined in global scope but it returns 0 records from custom scope.