Get Lookup Name value not GUID on a Formula inside a Business Process

Hi,

Is there a way to get the lookup name column instead of the guid from a Read Task on a Formula?

From a trace I can see that the Lookup Name is getting loaded but i can't find a way to retrieve it, i can only make a reference to the Type field

 

I tried getting the element and then calling the get column:
 

[#Read Account.First item of resulting collection#].GetColumnValue("TypeName")

But i only get a runtime error:

An error occurred while applying the value of the parameter "RecordColumnValues" of the business process element:
    Unable to compute expression "[#[IsOwnerSchema:false].[IsSchema:false].[Element:{3fc842fe-cf6c-447b-96d6-c4a5ad44b60b}].[Parameter:{1b74925e-637e-42f3-982d-c444f038071a}]#].GetColumnValue("TypeName")", error: Object reference not set to an instance of an object.

Any help is appreciated

 

Like 1

Like

3 comments

Hello,

If I understood your question correctly, you would like to retrieve the Lookup Name value instead of its GUID. I’d like to clarify that in a Formula you can only work with the Lookup ID, so the display value of the Lookup field is unfortunately not available directly through Formula.

If you need to use the Lookup Name in your process, the recommended approach is to perform an additional Read of the record. By reading the related object, you will be able to access the Name column and use it further in the process logic.

This way you can safely obtain the Lookup Name and ensure the process works as expected without running into runtime errors.

Hi Anastasiia, 
 

It's seems a was of time and resources to force the user to do another read action when the data is already loaded.

Is it planned as a featured to make the lookup name available to use?

 

It would save time building business processes,  make the business processes less cluttered and  take less actions on the system.
 

Hello,

Thank you for your follow-up.

The runtime error you encountered occurs because the formula was configured to call GetColumnValue on a GUID of item, which is not valid in this context.

For correct configuration of formulas, I recommend reviewing this article: https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/business-process-setup/process-formulas

A simpler and reliable approach is to use a Read Data element: by reading the record by its Lookup GUID, you can retrieve the full information you need, including the Lookup Name, without encountering runtime errors.

Show all comments