While Recording the script Partner function is captured in the script. But when creating if on index condition it is not available from the drop-down menu.
Partner function field is recorded as key.
Change the partner function format from key to text. so that it is available for creating if on index condition. Then apply if on index condition for the partner number field.