We have created a search form to search on "Name" attribute and below is the SemQL Condition for the same:
(:SEARCH_PARAM_NAME is null OR UPPER(Name) LIKE '%' || UPPER(:SEARCH_PARAM_NAME) || '%')
We need to expose this search form via REST Client API or Named Queries. Can you let us know how to achieve the same.
Best Answer
B
Bharat Joshi
said
over 2 years ago
The details in this article were called from this doc where a variety of ways to query your data via the REST API are spelled out in some detail. In addition, there is a new, very good, tutorial on the same subject located here.
You would need to replace the IP address, data location and entity name with your own. This query is looking for Golden Company records like ‘HARLEY’. I recommend the upper as it will remove the case sensitivity of your search.
This query is looking for Golden Companies with a name like ‘General’ and a state like ‘MI’ The fastest way to determine how your query should look is to go to the application and apply a filter to a Browse Business View action. If you're looking at a Browse Business View action in the app you'll see an filter icon in the upper right corner, it looks like this:
Click that and for search type select SemQL, in the filter condition, create your wildcard query, or any query for that matter. Here I filtered on company name like 'General' and state like 'MI'.
When you apply this filter, you will see how it needs to be rendered to include the control characters so it can be sent to the rest API. In the resulting URL you will see something like this:
Everything inside the double quotes after "semqlCondition" is what you'll need to send to the API using the ?$f= syntax that I show above. Alternatively, you can google each control character you need and build your query using them directly. For example, we can infer that:
%20 is a space
%27 is a single quote
%25 is a % sign (somewhat ironically, I might add)
and so on..
1 Comment
B
Bharat Joshi
said
over 2 years ago
Answer
The details in this article were called from this doc where a variety of ways to query your data via the REST API are spelled out in some detail. In addition, there is a new, very good, tutorial on the same subject located here.
You would need to replace the IP address, data location and entity name with your own. This query is looking for Golden Company records like ‘HARLEY’. I recommend the upper as it will remove the case sensitivity of your search.
This query is looking for Golden Companies with a name like ‘General’ and a state like ‘MI’ The fastest way to determine how your query should look is to go to the application and apply a filter to a Browse Business View action. If you're looking at a Browse Business View action in the app you'll see an filter icon in the upper right corner, it looks like this:
Click that and for search type select SemQL, in the filter condition, create your wildcard query, or any query for that matter. Here I filtered on company name like 'General' and state like 'MI'.
When you apply this filter, you will see how it needs to be rendered to include the control characters so it can be sent to the rest API. In the resulting URL you will see something like this:
Everything inside the double quotes after "semqlCondition" is what you'll need to send to the API using the ?$f= syntax that I show above. Alternatively, you can google each control character you need and build your query using them directly. For example, we can infer that:
%20 is a space
%27 is a single quote
%25 is a % sign (somewhat ironically, I might add)
Sumetha JEEVAA
Hi Team,
We have created a search form to search on "Name" attribute and below is the SemQL Condition for the same:
(:SEARCH_PARAM_NAME is null OR UPPER(Name) LIKE '%' || UPPER(:SEARCH_PARAM_NAME) || '%')
We need to expose this search form via REST Client API or Named Queries. Can you let us know how to achieve the same.
The details in this article were called from this doc where a variety of ways to query your data via the REST API are spelled out in some detail. In addition, there is a new, very good, tutorial on the same subject located here.
You would need to replace the IP address, data location and entity name with your own. This query is looking for Golden Company records like ‘HARLEY’. I recommend the upper as it will remove the case sensitivity of your search.
http://13.56.77.82/semarchy/api/rest/query/DLOC2/Company/GD/?$f=Upper(CompanyName)%20LIKE%20%27HARLEY%25%27
To add additional parameters, it would look like this:
http://13.56.77.82/semarchy/api/rest/query/DLOC2/Company/GD/?$f=Upper(CompanyName)%20%20like%20%27%25GENERAL%25%27%20and%20Upper(RawAddress.StateProvince)%20%20like%20%27%25MI%25%27
This query is looking for Golden Companies with a name like ‘General’ and a state like ‘MI’ The fastest way to determine how your query should look is to go to the application and apply a filter to a Browse Business View action. If you're looking at a Browse Business View action in the app you'll see an filter icon in the upper right corner, it looks like this:
Click that and for search type select SemQL, in the filter condition, create your wildcard query, or any query for that matter. Here I filtered on company name like 'General' and state like 'MI'.
When you apply this filter, you will see how it needs to be rendered to include the control characters so it can be sent to the rest API. In the resulting URL you will see something like this:
Everything inside the double quotes after "semqlCondition" is what you'll need to send to the API using the ?$f= syntax that I show above. Alternatively, you can google each control character you need and build your query using them directly. For example, we can infer that:
and so on..
Bharat Joshi
The details in this article were called from this doc where a variety of ways to query your data via the REST API are spelled out in some detail. In addition, there is a new, very good, tutorial on the same subject located here.
You would need to replace the IP address, data location and entity name with your own. This query is looking for Golden Company records like ‘HARLEY’. I recommend the upper as it will remove the case sensitivity of your search.
http://13.56.77.82/semarchy/api/rest/query/DLOC2/Company/GD/?$f=Upper(CompanyName)%20LIKE%20%27HARLEY%25%27
To add additional parameters, it would look like this:
http://13.56.77.82/semarchy/api/rest/query/DLOC2/Company/GD/?$f=Upper(CompanyName)%20%20like%20%27%25GENERAL%25%27%20and%20Upper(RawAddress.StateProvince)%20%20like%20%27%25MI%25%27
This query is looking for Golden Companies with a name like ‘General’ and a state like ‘MI’ The fastest way to determine how your query should look is to go to the application and apply a filter to a Browse Business View action. If you're looking at a Browse Business View action in the app you'll see an filter icon in the upper right corner, it looks like this:
Click that and for search type select SemQL, in the filter condition, create your wildcard query, or any query for that matter. Here I filtered on company name like 'General' and state like 'MI'.
When you apply this filter, you will see how it needs to be rendered to include the control characters so it can be sent to the rest API. In the resulting URL you will see something like this:
Everything inside the double quotes after "semqlCondition" is what you'll need to send to the API using the ?$f= syntax that I show above. Alternatively, you can google each control character you need and build your query using them directly. For example, we can infer that:
and so on..
-
Recover Deleted(soft Delete) Record and Configure in Application
-
How Can I Trigger Enricher or Sql Procedure when deleting?
-
Unstructured and Semi Structured Data in Semarchy?
-
Read CSV files from AWS S3
-
Find SQL Statements Generated for Match Rules
-
Is it possible to disable specific steps of an Integration Job?
-
Reset the Override on Many Records Through the Interface or By Script
-
PL/SQL Procedure With B_CREDATE and B_UPDDATE Not Mapped or Loaded, Columns Will Be Null
-
Unable to Load Publisher Data Using Continuous Load
-
LoadDataRecord contains non persitable expressions when trying to publish Data using the Rest API
See all 61 topics