How to get the particular row by column in smartsheet api - smartsheet-api

I am using smartsheet as a database and I want to query the smartsheet by column name equals value like in sql db for example: To get the particular row of Employee sheet where salary equal to 10000. But documentation describes only how to get list of rows and how to update and delete rows by row id.
https://smartsheet-platform.github.io/api-docs/?java
What i want is to achieve without knowing id of the row. But I can do by search function by searching the salary of the employee
https://api.smartsheet.com/2.0/search?query=10000
and the response of above call will have row id and again i should make a call with rowid to get that row by below call which I don't want.
GET /sheets/{sheetId}/rows/{rowId}
Can anyone help me out?

Although some folks do try to use Smartsheet like a database, it's not really designed to be queried via API in the same way that you'd use transact SQL to query a SQL database.
I don't believe the scenario that you've described (i.e., using the Smartsheet API to retrieve row(s) in a sheet where [column value] = [specified value]) is possible. Instead, you'll have to use the API to get the data in the sheet (Get Sheet) and then in your code, query the data that you received in the API response (to identify the row(s) that match your query criteria).

Related

Sails 1.0 Group By

Now that groupBy is deprecated, how can I mimic a SQL command like SELECT COUNT(*) FROM table GROUP BY xxx using the Waterline ORM ?
This page recommends using .sum() and .avg() but these methods are for number-type columns. Here I want to be able to count the rows of grouped columns, whatever type it is.
I think for specific groupBy query, you've got two choices.
The first one is a 2 step action.
1) Select all the unique element "group by field" you've got in the database.
2) Then count the record for each unique group by field element.
The second one is to use .sendNativeQuery() wich allow you to send a native SQL query to the datastore (you can use this only if you use a real SQL server and not the embedded Sails.JS database)
sendNativeQuery() Documentation

Crystal Reports: If/Else formula giving wrong results

I am writing a Crystal report with 2 separate queries - one using DB2 database and one using a SQL database. I linked the queries together using a field, though I did have to convert the data type on one so it could be linked (not sure if this is relevant).
The DB2 query is giving me all of my customer data displayed on the report, including a customer ID. The only thing I'm pulling from the SQL DB is the same customer ID, just from another table. If the customer ID from the DB2 query is found in the customer ID list from SQL, I do not want to display that customer record.
First, I created a formula called "CustID" like this:
if {Command.Customer_ID} = {Command1.Customer_ID} then "True" else "False"
I then wrote a Record for Select Expert like this:
{#CustID} = "False"
This is giving me no records returned at all. I feel like I have a lapse in my logic somewhere but I can figure out where. Thanks in advance.

Access how to show record count of a table on a form

I want to show a variable value (record count of a table) on an Access form. I tried with a textbox by defining its control source with the following and many other internal functions but all returned only errors. Anyone can help? Thanks
select count(*) from TableName
I would also suggest the DCount domain aggregate function as suggested by Andre, but to offer an alternative, if TableName is the Record Source for your form, you can also use:
=Count(*)
To count all records in the Record Source, or:
=Count([FieldName])
To count all non-null values of a particular field in the Record Source.
You need = and domain functions.
=DCount("*", "TableName")
should work as control source.

Oracle BI: how can i retrieve another result list from current result list

I am using Oracle Business Intellgience (12c) and let's say I have a report resulted from an execution of the following query
select code_filial, max(paid) as maximum_pay
from leads_history
group by code_filial
It will return a table with highest budget value related to the each filial. Now what i want is the following: when i click to max(paid) result in a table, another table should appear with the information about max(paid) account. I tried master-detail relationship, but couldn't succeed.
Can anyoune help with that?
That's out-of-the-box functionality. As soon as you make a navigation action link to another analysis where your code_filial is set to "is prompted" the context will be passed and the analysis filtered.

How to delete only a subset of posted data in firebase

Posting data to firebase generate new items similar to the following example:
log
-K4JVL1PZUpMc0r0xYcw
-K4jVRhOeL7fH6CoNNI8
-K4Jw0Uo0gUcxZ74MWBO
I struggle to find how to e.g. delete entries that is older than x days - preferably with the REST API. Suggestions appreciated.
You can do a range query.
This technique requires you to have a timestamp property for each record.
Using orderBy and endAt you can retrieve all of the items before a specified date.
curl https://<my-firebase-app>.firebaseio.com/category/.json?orderBy="timestamp"&endAt=1449754918067
Then with the result, you can delete each individual item.