Last activity: 21 Feb 2023 20:39 EST
How To Update Properties in TOP Page?
I have an activity in class X that loops a page in the same class. Within this loop, there is another page loop that is in class Y. In this class Y loop, I call an activity in class Z. In this activity, I want to increment a value that is in class X and display this property in a section that is in class X.
I use property-set TOP.propertyX=TOP.propertyX+1.
I checked the tracer that the property is incremented however it's shown as blank in the section X. Did I miss anything? Hope this scenario that I explained clear.
Aaseya IT Services Ltd
@alfin.putra Are you calling the Activity to set the property in flow action or the Action set of the section?
Also you need to the property only for display purpose?
@TummalapalliNarayana Activity is called in background process agent and yes property is only used to display a count
After changes on X class, save and if require do the commit.
@Poosala There is already save after this step and we're not trying to commit anything yet as we still need to update something in the loop outside this activity
@alfin.putra The reason why it is not reflecting is because it might have not been committed, where exactly are you calling this activity in which context ? based on the context we will have to see if the values need an explicit save/commit or not
@SrinidhiM Please see the steps in the attachment. We already put a save step after propertyset the TOP property. Do I need to add another save step that is not in ChildCaseZ page?
@alfin.putra Hi, Can you please confirm if you have added the save on the top page seems like you have only added save in ChildCaseZ Page whereas you set the properties on TOP and also can you please let me know if the save or commit activity does obj-save? if yes then you have to add one for Top page as well
Updated: 15 Feb 2023 17:52 EST
@SrinidhiM Hi, I've tried to saveorcommit on TOP page but still the same, the property not showing up in the UI and yes saveorcommit does obj-save. I've also tried obj-save as well on TOP page but same results
@alfin.putra Please try to save the TOP page,so all the data that you are setting on that page will be saved.
@GayatriPavuluri Hi, tried save on TOP page but still same results
Updated: 21 Feb 2023 20:39 EST
@alfin.putra TOP keyword may not work correctly in activities context. You may want to get reference to your top level page and then use it in the inner loops. You can try following steps for your usecase.
1. Declare a parameter of type page.
2. Declare this parameter page in Pages and Classes.
3. In the activity get reference to top level page and store in the parameter. Use it in the inner loop.
3.a Use this function to get page name of top level page.
4. You can do operations on this parameter page reference such as Obj-Save.