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

Hi

I want to send a notification to a case owner and an escalation manager when a case has not been updated in 48 hours.

For this I found in the admin guide a reference to performing a pipeline condition (https://academy.creatio.com/docs/7-18/user/bpm_tools/business_process_setup/formulas/process_formulas) and used this to create the following condition:

 

(decimal)RoundOff(([#System variable.Current Time and Date#]-[#Read modified time.First item of resulting collection.Modified on#]).TotalHours) > 48

However, when trying to save I get the following error - Formula value error: Invalid Operator. I cannot see why this is the case, as it follows the guide exactly with just the variable values updated.

 

thanks in advance

 

Mark

 

Like 0

Like

0 comments
Show all comments

Hi there, when I setup a business process, I have to get the value from an element parameter like [#Get base currency rate.XXX#] where XXX is the value stored in a system parameter, say [#Base currency#]. Any suggestion? Thank you in advance!

Please refer to the following figure.

Like 0

Like

2 comments

Hi Andrew,

Just an idea, you could possibly use a formula to get the value you're after. It would be a big series of ?: statements to ultimately put the value into a process parameter. For example: 

(BaseCurrency == "TWD" ? [#Get base currency rate.TWD#] : (BaseCurrency == "USD ? [#Get base currency rate.USD#] :  ...you get the idea))

If you're only going to be handling the 5 currencies you have in your screenshot, you could put each in it's own process param and then would be easier to work with for the formula or in a script task.

Ryan

Ryan Farley,

Hi Ryan, thank you for your advise. Yes, your suggestion is a solution which I thought of previously. But I didn't find any "if then else" formula in the documentation from Creatio. Can you show me where to find this formula? Thank you very much!

Show all comments