dynamically select and query a record in peoplecode