background.portalID(...)
background.portalID(posInteger) // id
The portalID function returns a portal from the specified background by its ID.