<P> A major part of the character Jim Halpert is his relationship with Pam Beesly, which is often the subject of office speculation . This is made worse by the fact that Pam was engaged to Roy Anderson, a Dunder Mifflin warehouse worker . Throughout the first two seasons, incidents such as Pam falling asleep on Jim's shoulder in "Diversity Day" and drunkenly kissing him in "The Dundies" show a possibility of the feelings being mutual; however, Pam never acts on them and she remains engaged to Roy . On one occasion, in "The Fight," his flirting with her goes a little too far, when Meredith looks over to see him play - fighting with her, causing her to shut him down immediately, startling him with her abruptness, though she eventually forgives him . He becomes so upset when he hears Pam discuss wedding details that he calls a travel agency and schedules a trip to Australia, deliberately making himself unable to attend the wedding . Feeling bored by his job, tortured by his situation with Pam, and guilty about a stack of complaints Dwight has filed against him, Jim investigates a transfer to Dunder Mifflin's branch in Stamford, Connecticut . In the season 2 finale, "Casino Night", he confesses his love for Pam in the office . Pam, whose wedding to Roy was planned out and just weeks away, clearly shows her anguish but gently turns him down . Jim tearfully walks away, later kisses her in the office, and the season ends . In the third - season premiere "Gay Witch Hunt", it is revealed that he did transfer to Stamford despite the fact that Pam has called off her wedding and he clearly still harbors intense feelings for her . His reason is later stated as "It's just, I kinda put it all on the line . Twice . And she said no . Twice ." in "The Convention". </P> <P> Though in later seasons, after Ryan Howard's promotion, the relationship between him and Jim seems to be tense, in earlier seasons the two seem to be friendly . In "Casino Night", they are shown talking, laughing and drinking together . </P> <P> Throughout season 2, Jim dates Katy, who initially appeared in season 1 as the "Purse Girl" in "Hot Girl". After Jim and Katy split up in "Booze Cruise", he leaves a message asking out a fellow Dunder Mifflin employee named Brenda, much to Kelly's disbelief . Jim's misfortunes are assumed to be because he is unable to get over Pam . However, things begin to look up for Jim as he befriends salesperson Karen Filippelli in Stamford, and when the company board of directors decides to close the Scranton branch, Jim is named Assistant Regional Manager of the newly created "Dunder Mifflin Northeast". However the company's plans change when Stamford regional manager Josh Porter accepts a job at Staples . The Stamford branch then closes, with a few employees being offered a transfer to Scranton . The offer to Jim to be Assistant Regional Manager stands, though now at Scranton . Jim is at first unwilling to return to Scranton because of Pam but eventually decides to do so . Karen, who has grown fond of Jim and wishes to pursue a relationship with him, also transfers to Scranton . </P> <P> In "The Merger", Jim's and Pam's reunion is awkward . Pam is overjoyed, but Jim is clearly uncomfortable . He lets Pam know that he is seeing someone, and gradually Karen is introduced as his girlfriend . As Jim settles back in at Scranton, he uses his promotion as an excuse to avoid his old interactions and pranks with Pam, claiming that pulling pranks is not appropriate for his position . However, in time, Jim does return to his old ways, especially targeting Andy Bernard, a Stamford transfer, and Dwight . </P>

Who did jim date before pam in the office