Passing of subfile row number not working for all users.

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
cbrent
Profound User
Posts: 24
Joined: Tue Oct 12, 2010 1:33 pm
First Name: Clint
Last Name: Brent
Company Name: Invue Security Products
Phone: 704-752-6513 x342
Contact:

Passing of subfile row number not working for all users.

Post by cbrent »

I'm experiencing a problem where the following logic works for some and not others. At first I thought it was a browser issue, but we're all on the same version of I.E. 8. I've written a program that displays documents in a subfile with virtual subfolders. Whenever a subfolder is clicked the documents within that folder is displayed. I'm using the following java script to pass the subfile row number the RPG program. However, when I execute the java script subfile row field S1Row is populated. When the script is executed by someone else it does not work. Please advise.

var nameId = this.id; var row = nameId.split(".")[1]; var docId = "S1OBJLNK." + row; var url = get(docId); var otype = "S1OBJTYP." + row; var typval = get(otype); changeElementValue("S1Row",row); if (typval != 'FLD') {window.open(url, "newin");} pui.click();
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Passing of subfile row number not working for all users.

Post by David »

I'm not sure why this wouldn't work without detailed debugging, but I'm wondering if this could be done in a simpler way...

It looks like this script is doing two things:

1. If the object type is not 'FLD', it will pop open a browser window to the object name.

2. It also attempts to set the row number value to a field with id "S1Row".

I gather that #2 is what is failing for you. Rather than populating this with JavaScript, have you tried simply binding the field S1ROW to the subfile's "cursor record number" property?

If you do this, you'll get the RRN of the subfile record that was clicked when the screen is submitted. If no subfile record number was clicked on when the screen was submitted it will be set to zero.

The program can then CHAIN to the subfile to get the record.

Does this help?
cbrent
Profound User
Posts: 24
Joined: Tue Oct 12, 2010 1:33 pm
First Name: Clint
Last Name: Brent
Company Name: Invue Security Products
Phone: 704-752-6513 x342
Contact:

Re: Passing of subfile row number not working for all users.

Post by cbrent »

That worked. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests