Where can I get all details on allowed formula systax and possible functions allowed to use
For example I was working to extract month & year from date and it was not so easy to understand best function allowed in business process formulas windows.

Looking for more details in addition to what we can see here:
https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/bu…

Like 0

Like

1 comments

Formulas are C#. Creatio does have a few built in functions that can be used in formulas, but for the most part, it's a better approach to just think of it as C#. For extracting the month and year from a date, you'd just use C# syntax for Year and Month. For example:

[#SomeDate#].Year

Ryan

Show all comments

I am trying use AggregationType.Sum for in source code schema for my web service but its not summing the the totals as i wanted to do. It only sends the first records Amount rather than finding the all the records with that condition match and total them up. Can anyone direct me to documentation of implementing this? 

 

 var esq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "UsrExample");
             
var totalSum = esq.AddColumn("UsrTotal");

totalSum .SummaryType = AggregationType.Sum; // Set aggregation to sum
             
// Added filters: 
           
FinalAmount= sessionCollection[0].GetTypedColumnValue(totalSum.Name);

 

Like 0

Like

1 comments

Hello Tony,

Example of adding the aggregate column to the query column collection (column must have the SUM aggregation type for all table records):

var esq = this.Ext.create(Terrasoft.EntitySchemaQuery, {
    rootSchemaName: "Activity"
});
esq.addAggregationSchemaColumn("DurationInMinutes", Terrasoft.AggregationType.SUM, "ActivitiesDuration", Terrasoft.AggregationEvalType.ALL);

You can read more in the article from the Academy.

Also I've found one more example in the Community question.

Show all comments

Hi Community!

How are you?

How could I put together a query similar to that with ESQ on the server side? Can I use aggregation functions?

 SELECT Max(l.CreatedOn), l.SmrRecordId 

   FROM SmrLoggingRecord l

     JOIN [dbo].[Case] c

        ON l.SmrRecordId = c.Id

        AND c.UpriEstadoCasoId = '78346E42-83AD-4790-B901-DB750A1D157E'

  WHERE l.SmrColumnCaption = 'Estado del Caso' 

  GROUP BY SmrRecordId

King Regards!

Ezequiel

 

 

Like 0

Like

1 comments

Hi,

There is good description here how to write such queries. When reading pay attention to "Adding columns to query" section there. You can not only use aggregation in queries but also can use aggregation in filters

Show all comments