ExecuteSQL ( "SELECT \"UserId\" FROM \"Users\" WHERE \"UserName\" = ?" ; "" ; "" ; Get ( UserName) )
I would set the user ID into a global field during the OnOpen script (if you have one), and use that throughout the system. That way it is stored and you never have to do a calculation again. Use coherentKris's calculation to find it and store it.
Then in the table that you want this stored, create an auto-enter calc that pulls this ID from the global field you set.
I may have figured it out, I basically just went to a layout for that database, and then performed a find for the userName based on account name and then setting the userId as a variable because it would only search for that one field
This happens very fast, I did not even see the layout change, it looked like it was in the same layout