Issues with Record in Scope

Posted by Fil on 20-Nov-2014 05:18

Hi all

Long time Rollbase user (pre Progress days), with what appears to be a curly one, but maybe I'm blind. Certainly couldn't find anything existing in the forum.

I have an issue with the Record in Scope functionality on Private Cloud (latest). Wondering if anyone has seen it as well or has an idea on a workaround or what the problem might be. 

I have 3 objects, that are all related. A is related many-to-many to B, B is related one-to-many to C and C is related many-to-one to A. When viewing a record of type A, I select an action of a particular B record listed on the page which creates a new C. The new C page has lookups for both A and B on it, both selected to show record in scope for new records. There are multiple A records which are linked to the same B records (could be different but doesn't have to be).

The problem is, on the new C record page it selects the wrong record in scope for the A record - ie it doesn't select the A record I just came from on the page before, rather one of the other A records.

Confusing enough?

All Replies

Posted by Orchid Corpin on 20-Nov-2014 08:39


How did you go to NEW page of C? Is it from the related list from object A VIEW page?



Posted by Orchid Corpin on 20-Nov-2014 08:49

It seems to be working fine in my testing, also
My Setup:

1. In my parent VIEW page I have related list view of child records, under that list view I have New Child button enabled.

2. In Child's NEW page I set the parent lookup into Hidden style (which we can enable Show Record in Scope).

3. From parent View page I click New Child button and I can see in the lookup the parent's value on it, tried also to several Parent records and still seems to be working fine.



Posted by Fil on 20-Nov-2014 16:09

No, my case is a slightly different setup:

1. On my parent VIEW page of record A1, I have a related list view of child records B1, B2 and B3. One of the columns in that list view is Workflow Actions for the B records

2. I click on Workflow Action for B1, whose function is to create a new different child record C (different object to B)

3. A, B and C are related as per my original post

4. On the NEW page for object C, I see the lookup for parent record B is correct, but the lookup for parent record A is not, instead of reading A1 it reads A2 which is also related to B1, B2 and B3.

I have worked around it by adding some javascript code on the VIEW page of A, that adds a parameter to the href attribute on the Workflow Action links in the related list view of B records. The parameter contains the id of the currently viewed A record. Then, on the NEW page for C, another snippet of code looks at the search parameters in the url and if the id of A parameter is present, sets the A lookup to that value.


Posted by Fil on 20-Nov-2014 16:12

Incidentally, the VIEW page of record A, as well as having a related list view of B records, also has a related list view of C records.

Posted by Orchid Corpin on 21-Nov-2014 09:00

Hi Fil,

I tested the said issue but seems to be working fine. I could not replicate the issue.


- No code involve. No data map.

- Parent = Warehouse, Child = Product, Child = Depot

- Warehouse has related list view of Product, Product list view has an Workflow Action with type Related Record - when clicking the action this will redirect to Depot new page

- Depot new page has two lookups (Warehouse and Product) both are set to Hidden and "Show Record in Scope"

See images below. All are working fine with any code involve and data map.

Test First Parent.

Test Second Parent.

Try removing any customization or code that you have created. Also if you included a Data Map try removing it in the workflow action.



Posted by Fil on 23-Nov-2014 16:30

Hi Orchid

Thanks for that!.

I have no customizations, code or data maps involved. However, to get things identical, you would need 2 identically named Warehouse records (in my case they are calendar tasks with the same name but different dates) called exactly the same thing, (eg in your case warehouse, notice no auto-number), and relate it to the exact same list of Products, and then on the first Warehouse record, try the action and see what Warehouse record gets picked on the Depot page.

Hopefully in the next few days I will get a chance to setup a different tenant on the private cloud and try it there from scratch.


Posted by Orchid Corpin on 24-Nov-2014 16:11
Hi Fil,

Sorry, I couldn't picture out how does it look like, can you give some screenshots.
It would help me identify the issue.

Posted by Fil on 24-Nov-2014 16:13

Will do, but later in the week.


Posted by Orchid Corpin on 24-Nov-2014 16:16
No worries, just take your time.

Posted by Fil on 24-Nov-2014 17:09

Change of plan. Here it is:

With the following setup:

Inspection Task Object: Task attribute selected

Site Object: Workflow attribute selected

Inspection Object: nothing special selected

Here are the relationships for Inspection Tasks:

Here are the relationships for Inspections:

On the site object, create a workflow action called Inspect which creates an Inspection.

With that setup, create 3 sites called Site 1, Site 2 and Site 3. Now also create 2 Inspection Tasks as per below:

Notice they are called the same (not sure if that is relevant or not - will test after posting this), but scheduled for different days.

On both Inspection Tasks, attach all 3 sites created above. Then, selecting one of the tasks, I have selected the one highlighted in yellow above, you get the following:

Notice this is ID 52354447. Next, click on the Inspect action for one of the sites. I have clicked on the yellow highlighted one for Site 1. You get the following:

Which looks fine until you click on the Inspection Task that has been selected from scope. I click on Area 1 highlighted in yellow above and get the following popup:

Notice the ID is 52354446 instead of the expected 52354447 which is the task I was on on the previous page. Inspecting the element without clicking on Area 1 confirms the wrong ID is selected. 

It is worth pointing out that the first time I did this, it worked fine - that is, I first clicked on Area 1 (52354446) and selected Inspect and it selected 52354446 from scope for the new inspection, but then I tried it on the second task and it did as you see above. Also, on my production system, it the inspection task record in scope is the later one not the earlier one as here, but I suspect it has to do with the order in which the inspection tasks are viewed??

The overall effect of this of course, is that the Inspection created does not end up on the Inspection Task being processed and hence it looks to the user that the Inspection didn't get created. Reality is that it is created, but on a different task. 

HTH, and let me know if I've missed something.


Posted by Orchid Corpin on 26-Nov-2014 12:52

Hi Fil,

I tested the same by naming two of my Parents with same Name and added a Task attribute. Unfortunately I could not replicate it going back and forth with parents and clicking the action of a Child record.

Parent Record List. Same sets of Child records

Image 1

Image 2

I click on same child's workflow action but I fail to replicate the issue, I went back and forth to both parent also detaching and attach back the child records, deleting both parents and create another same name but I still see correct parent's ID. This seems to be working fine.


Posted by Fil on 26-Nov-2014 16:23

Interesting. I can't think of anything else. I did this on a brand new application and tenant. No extra code anywhere. First one worked, as soon as I went into the second one, it failed, consistently as well, not just once. I'm hosting on Linux, what are you on? Not that that should make a difference.


Posted by Orchid Corpin on 26-Nov-2014 16:56

I have windows 3.0.5. can you confirm if I get the same steps.

1. Parent to child relationship is many:many, Parent has event attribute
2. Created 2 same name parents. Created child records.
3. Attached same set of child records to both parents.
4. Assumed there is already workflow from child. From parent 1 page, click on create action (when in a new page I did not save it), see the same ID from parent record.
5. Clicked Cancel from the new page upon seeing same ID of parent.
6. Go to parent list view, View parent 2 and click child create action, same ID as the parent. (did not save the record upon seeing the same ID)


Posted by Fil on 26-Nov-2014 17:06

1. Yes many:many (but the other relationship one is One:many)

2. Yes 2 parents of the same name

3. Both parents with the same set of child records on the many:many relationship (in my case 3 children)

4. Yes, workflow on child is create action and I didn't save either

5. Yes, Cancel

6. Yes, Back to List, view parent 2 and click on child create action (for the same child as in step 4), and I see the same parent ID as in step 4 instead of the parent id of step 6 :(


Posted by Orchid Corpin on 27-Nov-2014 08:02

Are you using OE in your Rollbase? I noticed I'm using MySql and will test it using OE too, let's see if I can replicate it.



Posted by Orchid Corpin on 27-Nov-2014 09:05
I can replicate it now! I'll play with it first.
I'll try to look for a workaround to make this work. Will be back.

Posted by Orchid Corpin on 27-Nov-2014 09:21

Ok got it!

1. I noticed in the first testing in the child list I added the parent column there <---- This works fine!
2. I noticed in your testing you don't have the parent column in the child list <------ The issue occur!

Now in your setup try adding the parent into the child list column. See image below.

Hope this will help.


Posted by Fil on 27-Nov-2014 15:14

Nice spotting! Yes, adding the parent makes all the difference and works for me now too.

Thanks! I think Progress still need to look at it and fix it, but at least that works now :)

Again, nice spotting!


Posted by Orchid Corpin on 27-Nov-2014 15:59

Yes, I will still file a defect regarding this, this need to be fixed.



This thread is closed