looping

  

i want to ask. i have a condition (membercode = getlistpersonal.membercode) when true it's update and when false it's insert. i use looping (for each) to determine whether it is true or not. i want to when already exist looping is stop. how to make it ?

put your loop inside a different action (ex: CheckIfMemberExists). when the condition is true, exit the action.

But why not run a query or aggregate directly on the table ListPersonal ? Or is it a service?

Hi Zainal,

As told by Pedro:

- create an action

- call it from other action:

regards,


Mental Image wrote:

Hi Zainal,

As told by Pedro:

- create an action

- call it from other action:

regards,


Hi

do I create an action on the Server Actions ?


Yes, you do.

Mental Image wrote:

Yes, you do.

i already create action but i get error "500 internal server error"


For a different approach, you could use a ListFilter and use the first record in the new List. Performance-wise that won't differ much, and it makes for much cleaner code.

Zainal,

This really does not help.

You need to be more informative on the error, showing also what you have done, what you are trying to accomplish and what you get.

Otherwise, we will be here trying to figure out what you're doing wrong based on pure guessing.

If you can, provide an OML, pointing us to where is the problem and what you're trying to do.

If you can't, at least put here some images of the related code explaining what you did.

Cheers