I am unable to replicate the issue. Here are the steps I took.
1. In FileMaker Pro 13.0v1, I created two tables and a one-to-many relationship.
2. In the first record, I created five related records in the portal.
3. I created a button outside the portal with the script step "Show Custom Dialog", with the calculation Get ( ActivePortalRowNumber )
4. I put my cursor in the third related record, clicked the button, and the Custom Dialog shows 3.
5. I set the field for Sharing with all users and access via WebDirect, closed the file, and uploaded it to FileMaker Server 13.
6. Using Chrome on Windows 7, I opened the hosted file, placed my cursor in the second related record of the portal, clicked the button, and the Custom Dialog shows 2.
7. I logged out of Chrome, went to a Mac, launched Safari, and opened the file via WebDirect. I placed my cursor in the fourth related record of the portal, clicked the button, and the Customer Dialog shows 4.
Let me know what I'm doing differently from you so I can replicate the issue.
Perhaps a script trigger is being tripped that performs a script with the commit records step in it? That would remove the focus from the portal and then you'd get the zero result that you report.
TSGal, Your setup looks exactly like the configuration I am using. When I did this on the desktop client, I got the proper response. When I uploaded the exact files to the WebDirect server, I got no row number response. I'm not sure what to tell you. The only thing I can see that might be different is that my application uses a separated app/data model (2 files). Do you think that might have anything to do with the different results we're seeing?
I've worked around the issue by capturing the row number in a global field and using it when I click the external button.
The data separation model would not show a different result.
A 0 (zero) result will only occur if neither a related field is active nor the portal row is selected.
Capturing the row to a (global) field is fine for a workaround. That way, you no longer have to select/edit the portal row after the value is stored.