I converted my app from FMP5 - 11 - 17. There is a portal where i can get the ID Field of the selected row if it is the first row in the portal. All other rows get an empty ID.
All worked fine before the conversion.
try to move the fields in the portal for 1 or 2 pixels down. FMP12 is a different beast when it comes to measuring (-:
This sounds like field slipping out of portal which sometimes happens while migrating. Try to move field one pixel down.
I suspect your fields aren't actually in the portal, but on the layout themselves. Try repositioning the fields so that the boundaries are completely inside the portal row. Make sure to at least nudge them a bit so they register as being in the portal row.
Since you're going through such a huge jump in conversion, there's an expectation that you may have numerous issues from skipping 12 versions and 3 file formats in between. I'd highly recommend implementing a plan of action going forward to upgrade at least every other version.
Also as a note that usually "gets" people doing these conversions. The "classic" theme has been deprecated. It's a daunting task, but I would recommend creating your own theme based off a theme in v17 and resetting all of your layouts to use a modern theme. This can bring to light and prevent a lot of issues with layout rendering.
I confirmed all fields are in the portal, even moved them a bit away from the edges.
If you rebuild the portal from scratch, does it work as expected? Did you already convert the theme? Are you sure the relationship to that portal table is valid (since you probably had to convert that too)?
Instead of moving the field, move the portal. If the field moves with the portal, it is part of the portal and you are dealing with a different problem.
Rebuilt from scratch does not work either.
If there was an issue with the relationship, wouldn't the records not be visible in the portal?
How exactly do you “get the ID of the selected row”?
Set Field [ Master::PumpsListSelectedPortalRow; Get(ActivePortalRowNumber) ]
Enable the script debugger and do whatever user action performs that script. Look for any error code and Watch to see if a script trigger is being tripped that changes focus or commits records on you. You might put get (activeportalrownumber) into the data viewer as a watch expression and monitor what value is returned while you run script with debugger up.
The first row in the script gets the field value.
No errors in the debugger and the watch expression always returns the row id, example 1,2,3..... But the value of my field only shows when selecting the first row.
Retrieving data ...