Can't use function to convert or display value instead of using loop
Application Type
Traditional Web
Service Studio Version
11.6.2.3878
Platform Version
11.6.2.3878

Hi All,

Currently I have one issue is to display the values/wordings of entity column A differently based on whether the record belongs to party A or party B. I have to eliminate the use of any kind of loop to avoid getting the same set of records looped again after using the aggregate just to convert/modify the value of entity column A.

I have tried developing a service action and server action(act as function), but both are giving me error of " (the service action/server action name) function cannot be executed in the database, so it can't receive any attributes from the aggregate as parameter." like screenshot below.

The requirement is it has to be using a global action/function as many of our screens are using the entity for similar purposes while restricted to modify directly in each aggregate using that entity...

mvp_badge
MVP

Hi Junior, 

welcome to the community.

Is that possible for you to share the screen shot or sample oml for your scenario? 

I couldn't understand your problem completely here but i want to give a try.

You want to execute a function inside aggregate to get some value? on the basis of parameter?

If your aggregate is bind to table record widget, you can use webblock with input parameter in which you can pass the input from aggregate bind to your table widget or list widget and show desired value inside that webblock.

Hope this helps.

Rgeards,

Manish Jawla

If you cannot "simplify" the function to something that is available with sql functions, then the options are limited. What you could do, if possible in your scenario, is to "calculate" the value in advance (when saving the record) and store it in an extra column of your entity. It depends on your use case whether that is possible off course.

Using a function in the screens or making use of a webblock (like Manish suggested) ensures you don't explicitly have to loop the list, but you still are going to execute your function for each record.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.