Is any possible to update some attribute from List Record if data is same
Application Type
Traditional Web

Dear All,


I have LIST RECORD Variable. Some data from aggregate will be loop and assign to LIST RECORD Variable.

But, can I manage when looping and assign to variable will check If some data is exist or equal in LIST RECORD Variable will update other attribute on LIST RECORD Variable


mvp_badge
MVP

Hi Kane,

You can use the ListAny Action from System to check whether a record in your List Record Variable meets the specified criteria.

Hi,

How can i write some condition like i mention in ListAny

mvp_badge
MVP

Hi Kane,

It just a condition using the attributes of the List Record Variable (and if needed Local Variables and/or Parameters).

Hi,

I try to write on condition:

Name = Get.List.Current.Name


And use If widget, If true how can i Assign Start Point and End Point

mvp_badge
MVP

Hi Kane,

I'm not sure I fully inderstand what you mean by "Assign Start Point and End Point". If you want to add a record to the start of the List, you can use ListInsert with an index of 0. If you want to add a record to the end of the List, you can use a ListAppend.

If you want to access a particular record in the List, you can use indexing. So the first record of a List is MyList[0], the second is MyList[1] etc. You can use the Length Property of a List to access the last element: MyList[MyList.Length - 1].

Hi Kane,

Depending on where exactly this happens, you might want to do a ListClear on your LocalList

You run your aggregate

You loop your aggregate result, inside the loop :

ListIndex Node on your LocalList with your condition (e.g. Name = Get.List.Current.Name)

If node with condition ListIndex.position > -1

True branch : then that name is already in the list, so you do an Assign node

the exact assign I don't know, if there is always only max one record with StartPoint, and max one with EndPoint, then you can do something like

LocalList[ListIndex.position].StartPoint 

= If(Get.List.Current.StartPoint > 0, Get.List.Current.StartPoint, LocalList[ListIndex.position].StartPoint)

LocalList[ListIndex.position].EndPoint 

= If(Get.List.Current.EndPoin > 0, Get.List.Current.StartPoint, LocalList[ListIndex.position].EndPoint)

BUT, if that assumption isn't right (so there can be more Start or End records in your aggregate result), you'll have to perform some more logic in your assigns (do you take the max, the latest, the sum, ...???)

False branch : then that name doesn't exist yet in the local list, so you do a ListAppend node

Dorine

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