22
Views
8
Comments
Solved
Agregate in a server action from CS module use in enduser module: different results
Application Type
Reactive
Service Studio Version
11.54.43 (Build 63110)

Hello everyone!

In a CS module, I created a server action with 2 inputs. 

In this server action there is an agregate which use both of this inputs. 

When I put 2 value on the 2 test values,it's good I have a result.

On my EndUser module, I import my server action (put it on a data action set at start...)

When I use the debugger, I saw that it's the same 2 values than the test values I used before on the CS module but my output is empty.

I don't understand why.

Thanks!

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

ok, so your aggregate is still working.

next step, is to do something with the output of that.  So next is your output, how is that defined ? do you have an output variable on your server action from CS.  Is that populated correctly.

And next, do you have an output variable on your data action in your consumer module.  And are you actually populating the DataAction output with the output from your CS server action ?


2023-05-23 04-55-55
Wasimkhan Syed Abuthahir

Hi,

Can you share the OML?

Are you passing the input to that server action from the Data action?


Regards,

Wasimkhan S

UserImage.jpg
Shamin kurreembokus

Hello @Wasim Khan,

Thanks for your answer.

Yes I pass it in the data action. Inside the data action, I have my server action where I set its input parameter with screen's input parameter.

Regards

2024-11-01 10-35-12
Varuni Rajendran

Hi Shamin,

Data action (set as at start) may not provide values of aggregate on initialize , try to put logic in onafterfetch of aggregate and get the needed values which you want to pass to the server action of CS module.

Regards,

Varuni

UserImage.jpg
Shamin kurreembokus

Hello @Varuni Rajendran,

Thanks for your post.

I tried your solution but I have nothing in my aggregate.

2021-09-06 15-09-53
Dorine Boudry
 
MVP

@Shamin KURREEMBOKUS ,

quickest way to find out what is going on, is to debug your server action, and look at value of those inputs right before executing the aggregate

UserImage.jpg
Shamin kurreembokus

Hello @Dorine Boudry,

Yes when I debug my server action inside my server action, I see the right inputs before executing the aggregate. I see also the row after executing the aggregate.

But in the end user module, there is nothing on the output of my server action.

Thanks.

Regards

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

ok, so your aggregate is still working.

next step, is to do something with the output of that.  So next is your output, how is that defined ? do you have an output variable on your server action from CS.  Is that populated correctly.

And next, do you have an output variable on your data action in your consumer module.  And are you actually populating the DataAction output with the output from your CS server action ?


UserImage.jpg
Shamin kurreembokus

It's work now. 

The problem was the mapping between the aggregate result and the output parameter inside the server action.

Thank you. 

Regards

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