The if statement is just to differentiate the tasks, but there are already two tasks and i need the sys_id of both tasks assigned_to.   Only reason for using the if statement is so that i can store the sys_id of implement task assigned_to in obj.one and post implement task assigned_to value in obj.two. The while loop will run two times, first it'll fetch the imp.. task assigned_to and next the post imp.. task assigned_to.