cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Coding Examples of Setting / Getting values

SOLVED
MM_9665428
Participant

Coding Examples of Setting / Getting values

 

Hi, hoping you're doing well

 

I'm pretty new with thingworks and some functionalities still confuses me...

 

I need develop an aplication that:

 

- select a date range (I didn't see a Calendar Widget) and pass it to a service to make a query and get the results from db

 

- from a service read data from db and fill a List

  - from the selection of the list execute a query to read data from db

 

- from a service read data from db and fill a Graph

 

Also I need to manipulate de data from the query (make some calculations) and show them in the mashup

 

If you can give a coding example (or several) i'll appreaciate it.....

 

Best Regards,

Marcos

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Coding Examples of Setting / Getting values

@MM_9665428 

Please refer below:

 

- select a date range (I didn't see a Calendar Widget) and pass it to a service to make a query and get the results from db

 

[comment] Date time Picker widget or Time Selector widget are related with date range.

Below I have selected the datetime as the input parameter value of my "InsertRecord" service in order to insert an entry to database (bind data time picker widget with input parameter "DateTimeField" > "IndertRecord" service). You may refer it to make a query and get the results from db (sure you need to create some *GetRecordBasedOnTime* service):

2020-10-29_17-10-53.jpg

- from a service read data from db and fill a List

  - from the selection of the list execute a query to read data from db

Refer my latest reply on https://community.ptc.com/t5/ThingWorx-Developers/store-the-SQL-result-in-a-Datatable-entity/m-p/695... 

 

Best Wishes!

Teresa

View solution in original post

2 REPLIES 2

Re: Coding Examples of Setting / Getting values

@MM_9665428 

Please refer below:

 

- select a date range (I didn't see a Calendar Widget) and pass it to a service to make a query and get the results from db

 

[comment] Date time Picker widget or Time Selector widget are related with date range.

Below I have selected the datetime as the input parameter value of my "InsertRecord" service in order to insert an entry to database (bind data time picker widget with input parameter "DateTimeField" > "IndertRecord" service). You may refer it to make a query and get the results from db (sure you need to create some *GetRecordBasedOnTime* service):

2020-10-29_17-10-53.jpg

- from a service read data from db and fill a List

  - from the selection of the list execute a query to read data from db

Refer my latest reply on https://community.ptc.com/t5/ThingWorx-Developers/store-the-SQL-result-in-a-Datatable-entity/m-p/695... 

 

Best Wishes!

Teresa

View solution in original post

Re: Coding Examples of Setting / Getting values

Hi @MM_9665428.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.