open a state document by an app number but not by an app id