I am displaying a section of a certain class B in another class A using a data page that gets loaded by an activity. My problem is that I also need to edit this section (which belongs to class B) from within the class A. I have configured the data page to be editable (it is read-only by default). So now when I click Edit from a case of class A, I have the ability to do changes: (the change in the first screenshot is the cell inside, whose contents I changed to MX.3)
At this moment, the clipboard looks as such (this is before pressing submit):
My initial concern is this: my data page is called D_LoadSystemLandscapeFromInstance. However, it doesn't appear underneath Data Pages but under User Pages instead. Why is that so?
Now after I press submit:
So I can see that the value of product (the one I updated) is indeed present in the clipboard (MX.3).
Now after I refresh:
The value of product has disappeared. This lead me to think that it was only present momentarily in the clipboard.
So I decided to call an activity (that runs when the Submit button is pressed) that will actually do the save. I tried to do so by writing to the data page (D_LoadSystemLandscapeFromInstance) which is responsible for loading the section, but I have been unsuccessful.
Moreover, I tried to open the instance of class B (using obj-open-by-handle since I have its pzInsKey), and then write into it from the D_LoadSystemLandscapeFromInstance that is present in the clipboard, but I haven't been able to correctly reference/access it. It's as if it only contains blank values, which lead me to think that my reference is only seeing the First D_LoadSystemLandscapeFromInstance that is present in the clipboard (if you look at the structure of the clipboard, you can notice that there are 2 D_LoadSystemLandscapeFromInstance, one inside the other - now the first one of these pages, if you look at the first screenshot, is empty).
If it is relevant, in my activity in the Pages & Classes tab, I put:
Page Name Class
D_LoadSystemLandscapeFromInstance MX-MXSFA-Work-SystemLandscape (the class of this data page)
Then in my steps I tried to use it as the step page, but it didn't work. I tried to loop on it because it appeared to me to have a list/group structure, but the system didn't allow me to loop saying that I can only loop when the step page is of a list/group structure.
I am at complete loss as to why this is happening and how to approach a solution.
I would extremely appreciate your help!!
Thank you in advance!
***Updated by moderator: Lochan to add Categories***
For the question - 'My initial concern is this: my data page is called D_LoadSystemLandscapeFromInstance. However, it doesn't appear underneath Data Pages but under User Pages instead. Why is that so?'
This is because this is editable data page aka Load-only data page. Following is the help content for this:
Load-only — provides the initial contents of a page that, thereafter, can be accessed in normal read-write mode.
Not sure how you are able to see the values on clipboard on submit but on refresh values are lost? Is there a Refresh action configured? Trace and check if on refresh data page is getting loaded again though I think it should not reload.
As this editable data page is like any other normal user page, may be worth trying to save the page (Obj-Save) and see if it works. I have not tried this myself.
To loop on MatrixRows try step page as D_LoadSystemLandscapeFromInstance.MatrixRows
It doesn't necessarily have to be a refresh. If I exit the instance and then access it again the data is gone. What is happening is that the data page is getting loaded again yes. What I am trying to do is to save these values either by using the data page or by an activity in which I try to read from the updated data page on the clipboard.
I will try to access the MatrixRows and let you know what happens. But what about the values on the original data page? (if you look at the 3rd screenshot you can see that there are values on the data page and I would also like to access them). Finally, I was hoping that there would be an option to copy the entire data page contents in 1 go, similar to the Page-Copy method. I tried using the Page-Copy but it didn't work because I was unable to get a pointer on the data page that is in the clipboard in the first place.
I think that your data page has some parameters. Only then, we will see a structure like that in clipboard. It will show the original data page as top user page and different instances of same page based on the parameters passed to it. You can access that page by mentioned it step page with params like DataPageName[ParamName1: ParamValue1, ParamName2: ParamValue2]
My data page does indeed have a single parameter. This is the pzInsKey of the object that I am passing to the data page, then passing to the activity that is loading the data page and doing an obj-open-by-handle using that pzInskey.
I have tried thinking of a way that I can pass this pzInsKey yet again when I am in edit mode, but I have been unsuccessful; I'd be glad to hear any suggestion you might have!
I tried accessing the data page by specifying the parameter, but I got an error that seems to have to do with the data page being on a different ruleset than the activity from which I am trying to access this data page.
I am going to re-create both on the same ruleset, and I will let you know what comes up, but I am optimistic and believe that it should work!