Hi all, 

I'm trying to calculate 60 days before a date captured by the user to create a reminder. I'm using the Formula in the Business Process but I cannot make it work, I see the following error: Formula value error: Cannot convert type "Int32" to "Entity"

 

Any suggestion?

Thank you

Like 0

Like

2 comments

It looks like it's an issue with trying to set the parameter you've selected to the value of the formula - what is the type of the parameter? It should be an integer based on the formula shown, which will be returning the day of the month 60 days before the Fecha de Lanzamiento date.

Hello,
 

We tried to check the behavior. It looks like the problem lies in expression because you are using .Day at the end.
We were able to successfully subtract -60 days simply by using the .AddDays(-60) method. [#read contact.First item of resulting collection.Birth date#].AddDays(-60)

AddDays(-60)

AddDays(-60)

 

Show all comments

Today I saw in Creatio 8.2 something long awaited to be available in Freedom, the rule that allows you to designate a formula to a field.

 

But :-( when trying to designate a formula to a field, it doesn't allow me to do so and apparently what I saw is ‘on hard’ and it is not possible to add this element to our business rules yet.

 

I saw it in the OrderProduct object to calculate the total of an order line, you can change the formula, but not add a new one, because the ‘Set up formula’ element is not accessible.

Does anyone know how to access ‘Set values’ using formula?

 

Thanks

Julio

Like 3

Like

3 comments

Hello, some feedback regarding this question?

 

Thanks

Hello, 

 

Thank you for reaching out.

 

This functionality is still in development, so access to it will only be available after the official release, which is currently planned for version 8.2.2.

Sergii Zhmurko,

Thanks for confirming that we will have this feature soon! :-)

Show all comments

I have a string field that is being populated in this format, "myfielddata-data". I need to parse the data after the "-" to use in a business process.

Like 0

Like

1 comments

Hello Justin,

 

string myString="myfielddata-data";

int indexRetrieved=myString.LastIndexOf("-");

 

string result= myString.SubString(indexRetrieved);

 

other way:

string myString="myfielddata-data";

string arMyString[] = myString.Split("-");

 

string result = arMyString[1];

 

 

Show all comments

Hi,

I want to set a field value so that it is 1 hour BEFORE the start time field. Trying to do this via business rule but it's not letting me write a negative number (-1).

Any ideas how to do this?

Thanks,

Chani

Like 0

Like

6 comments

I did this with days but should work with hours and a date/time field.

 

[#System variable.Current Date#].AddDays(-7)

 

Updated via business process

Thank you. We rather not create a business process for such a thing. Looking for a way to do it via business rule. 

Chani Karel,

Hello,

This method can only be implemented through a business process using C# with the ".AddHours(-1)" method.

https://learn.microsoft.com/en-us/dotnet/api/system.datetime.addhours?view=net-8.0



Best regards, 

Orkhan

Create another date/time field and use the set field value in the business rule with the AddHour(-1) formula. That date field will then be one hour behind start time field

Rob Watson

There is no way to do AddHour(-1) in the formula.

Orkhan,

:(

Thanks for confirming 

Show all comments

Dear colleagues

 

To implement a process who automatically cancel activities not started from more than "XX" hours from the hour they are created, I filter all activities which meet some another conditions and Created on < Previous hours XX.

 

I want to use a System setting if customer want to change the XX hours, in the future, and not need to touch the process. 

 

Is there any way possible to replace 10 by a formula like 

Created on < Previous hours [#System setting.SLATasks#] (in the filter condition)?

 

Thanks in advance

 

Best regards

Julio Falcón

Like 0

Like

3 comments
Best reply

What I did is to create a Date/Time parameter called FechaSLA with this value 

[#System variable.Current Time and Date#].AddHours( -[#System setting.SLA MDA's#] )

and in the filter use Created On < FechaSLA , that's all!

 

Thanks

Hello Julio,

You can create a date/time param to use in the condition and then populate the param with a formula like this:

[#System variable.Current Time and Date#].AddHours(-10)

This formula takes the current date/time and adds a negative 10 hours  (which is subtracting 10 hours). The value of 10 could be a int param so it's flexible the amount of hours subtracted. 

Ryan

Ryan Farley,

Thanks Ryan...

 

How come I didn't see it? hahaha :-(

 

Regards

Julio

What I did is to create a Date/Time parameter called FechaSLA with this value 

[#System variable.Current Time and Date#].AddHours( -[#System setting.SLA MDA's#] )

and in the filter use Created On < FechaSLA , that's all!

 

Thanks

Show all comments

Does anyone know a way of using an exponential value in a formula in a business process? The C# forums say to use Math.Pow(base number, exponent number) but I get an error that "No applicable method "Pow" exists in type "Math" when using that in a business process formula. 

 

The use case is that there's a a 2% annual escalator based on the warranty years of a certain product. So the formula would be (base price)*1.02^(years of warranty)

Like 0

Like

1 comments

 

Hello Andriana,

In order to use the static “Math” class in C# code you should add the “System” namespace to the file:

using System;

If the issue still exists, please provide us with a source code of the module and the error message. It will help us to analyze the issue in more details.

Additionally, please find more information about the “Math” class in the article by the link below:

https://learn.microsoft.com/en-us/dotnet/api/system.math?view=net-7.0 

Best regards, Anhelina!

Show all comments

Which I select process element and double click to generate macro, after saving the formula value is empty.

 

In the console getting following error--

41  Error while sending request 

    response status: 500 (ValidateException)

    request url: ../DataService/json/SyncReply/ValidateProcessFormula

    method: POST

    request data: {"formulaValue":"[#[IsOwnerSchema:false].[IsSchema:false].[Element:{f5f1d34c-ee78-41d5-8364-7d1c12b93b36}].[Parameter:{ec7648e8-b1f3-4292-b5ef-5d0cc52...

log @ all-combined.js:41

 

Like 0

Like

1 comments

Hi!

 

You have specified "RealtyTypeId". Maybe you meant "ReadTypeId"?

 

Looking forward to hearing from you!

Show all comments

I try to set up a business process with a formula comparing if a specific field value in a selection list is set.

It seems that there is a problem with the translation I applied to the field values, they are available in German and English.

 

The formula goes like this:

 

[#PROCESSELEMENT.First item of resulting collection.FIELDNAME#] == [#Lookup.LOOKUPNAME.LOOKUPVALUE.b177588e-38fa-46d5-a092-0caafaa59373#]

 

PROESSELEMENT is set correctly to the process element in my business process

FIELDNAME is set correctly to the name of the field in the form

LOOKUPNAME is set correctly to the name of the lookup list

LOOKUPUPVALUE is set to the localized English version of the field value. It seems that there is a string comparison in place which doesn't work if my users language is set to German.

 

As there is already a UNID in the comparison string, how can I make it work in a translation setting?

Like 0

Like

0 comments
Show all comments

Hi,

How can i set up limited value of 100% on this. I'd like to Share % was max 100% and if it is 100% you can't add more. What is the formula. I started BP and i really don't know what formula could be used

Like 2

Like

1 comments

Hello,



You can use conditional flows for your process.



In one of the conditional flows, you can use the formula:

 

[#Read Competitors data.First element of the resulting collection.Share#]>100

More about conditional flows:
https://academy.creatio.com/docs/user/bpm_tools/process_elements_reference/flows/conditional_flow_shortcut/conditional_flow

More about formulas:
https://academy.creatio.com/docs/user/bpm_tools/business_process_setup/formulas/process_formulas
Show all comments

Formula does not allow me to input current datetime.

Like 0

Like

1 comments
Best reply

Hello Joseph, 

 

This function is not available for the Pivot tables as mentioned in this academy article.

This function is available only  for business rules. 

Best regards,

Anastasiia

 

Hello Joseph, 

 

This function is not available for the Pivot tables as mentioned in this academy article.

This function is available only  for business rules. 

Best regards,

Anastasiia

 

Show all comments