2 weeks ago
code
=======================================================================
status = SA_find_user("bogus user", &source_tag);
printf(" \n status *************************************** is [%i] \n", status);
=======================================================================
output
=====================
*************************************** is 0
=====================
Also happens with -
code
====================
chat *item_target_value = "bogus";
printf(" \n *************************************** CHECKING USER for item_target_value [%s]\n", item_target_value);
status = SA_find_user(item_target_value, &source_tag);
printf(" \n status *************************************** is [%i] \n", status);
=====================
ouput
=============
*************************************** CHECKING USER for item_target_value [bogus]
status *************************************** is [0]
=============
where 'bogus' is not a user in my Teamcenter db.
I would expect a status error(non 0) to be returned.
Appreciate any thoughts about this.
Thanks,
Roy
Solved! Go to Solution.
a week ago
You need to add a check that the return value source_tag != NULLTAG.
That's how the function is designed. Please see the documentation: https://docs.plm.automation.siemens.com/data_services/resources/tc/12.1/tcrefs/custom/en_US/ITKFunct...
Finds a user with the specified user_id. The user_id is unique in the database.
If user_id does not exist, user will be NULLTAG.
a week ago
Yes, after I posted this, I found sample code that indicated a nulltag was the check point.