Configure settings so that a user cannot save an invoice if the total amount of a customer's debt (taking into account the amount of the current invoice) exceeds $4,000.
SELECT (
SELECT
count(DISTINCT(c.id))-- c.id, c.name
FROM flight_detail fd
JOIN contact c
ON c.id= fd.contact_id
WHERE
-- get last year
(fd.departure_date>='2016-09-01' AND fd.departure_date<='2017-09-30')
AND
-- get this year
fd.contact_id IN (
SELECT fd_ly.contact_id
FROM flight_detail fd_ly
WHERE
fd_ly.departure_date>='2017-09-01' AND fd_ly.departure_date<='2018-09-30')) AS 'Customer Last Year Who Still Buy Ticket This Year',
(
SELECT
count(DISTINCT(c.id))-- c.id, c.name
FROM flight_detail fd
JOIN contact c
ON c.id= fd.contact_id
WHERE
-- get last year
(fd.departure_date>='2016-09-01' AND fd.departure_date<='2017-09-30')) AS 'Customer Last Year';
How to transform query to JSON format for sending data paramater DataService.
This query for get data from bpm and I want show the result to my 3rd app.
Not all queries can be easily translated in a single DataService request. In the most complex cases consider refactoring a query into few smaller queries and sending them one by one storing the result from first query and passing it as a parameter to the next query.
As far as I understood your business goal, you are trying to fetch some parameters via [Read Data] element in your script task and pass it further to the Delete query.
Firstly, you need to get parameters in the [Script Task] from the [Read Data] element.
For the interpreted process the algorithm is the next:
[#Read opportunity product.First item of resulting collection.Opportunity#] and [#Read opportunity product.First item of resulting collection.Product#]
2) Use business-parameters in your Script-task.
var opportunityId = Get<Guid>("ProcessParam1");
var productId = Get<Guid>("ProcessParam2");
Then you need to get the userConnection in order to pass it in the Delete query:
var userConnection = Get<UserConnection>("UserConnection");
I am commiting changes on my package to SVN repository and I got this error "ROOT CAUSE INCONSISTENT LINE ENDING STYLE" (please see image below), how can I fix this error? Thanks
Could you please, specify the way ActivityPageV2 was created? Did you change it via Section Wizard or create a replacing module in the Configuration manually?
If the source code of the replacing schema for ActivityPageV2 was changed manually, it is possible that UNIX and WINDOWS line end characters exist in the Activity page edit schema.
I have a query with aggregation SUM in products. But need SUMa field depend of the category.
How can make a subquery to sum based a condition
Regards,
esq.addAggregationSchemaColumn("[Product:OrderProduct:Order].UsrCost",
this.Terrasoft.AggregationType.SUM, "ProductCost");
esq.addAggregationSchemaColumn("[Product:OrderProduct:Order].UsrProfit",
this.Terrasoft.AggregationType.SUM, "ProductProfit");//Only if category of product is xxxxx sum the price
esq.addAggregationSchemaColumn("[Product:OrderProduct:Order].UsrPrice",
this.Terrasoft.AggregationType.SUM, "ProductProfit");
Using C# console application project we can insert data to BPM online,
My question is, how about adding multiple records? or do I need to re initialize all of this and trigger POST method in every record that I will insert.
I have 2 section, section Contact and Flight Detail (FD). Both are connected (FD is detail of Contact).
I want to display just apart of data of the detail were have conditions below:
Contact.Email == FD.Email AND Contact.Full Name == FD.Full Name
For example, I open data Contact with Full Name = “ALI BABA” and when I saw detail FD, the detail automatically only display data as the conditions above.
the picture below display all data of detail, while I want to display is data in the red circle.
I've got some weird problems with ProcessEngineService.svc. I'm trying to run a process with parameter sent via POST. In most cases it works fine, but sometimes the process starts with blank parameter (despite proper HTTP response code 200 "Ok"). There are no differences with request data. It is totally random whether it works or not. On new installation my process starts but also without values in parameter. Response code is 200 (Ok). I'm using the same code, the same version of software etc.
Unfortunately, it is not possible to determine the exact cause based on provided information. I would recommend you to set up logging on both sides. In this case you would be able to find coincidences based on logs and possible reasons for empty parameter issue.
Though, once you will retrieve possible causes, please let us know and we will be happy to assist you.
I normally get UserConnection from HttpContext and then use it to access the database. Now, when dealing with a business process that starts after a signal, HttpContext.Current is empty. Is there some default UserConnection that I can access?
I want to open a look up which by default has already selected records, please see image below. Lets say, I have look up "Main Activity". I want record "Main Activity A" by default was checked upon opening the look up window.
In order to add such functionality you will need to proceed with custom development to the basic functionality.
Overall, this would be a major development, and we highly do not recommend to interfere with basic functionality, since it can caused unexpected system behavior.
If you decide to go for development within the system, you will need to do the following:
- Add the LookupUtilitiesV2 to the dependencies of the schema, where lookup is located;
- Override the basic schema BaseLookupPageV2;
- BaseLookupPageV2 contains various methods, which are responsible for opening of the lookup and processing user actions. It also contains an attribute 'SelectedRows', which you might need in your development.
- Override the basic method opening the lookup, so to retrieve the collection of objects, before they are rendered on the page. Modify or add the needed object to selected rows.
- Add the clause, that your functionality will only execute for particular schema/lookup/section/page, since BaseLookupPageV2 is a parent schema for other lookups in the system.