Xbasic Functions convert_type() Alpha Documentation Comment All values in e coming from a UX are strings. So if e.documentSubmitted.primarykey = 100 you need to convert that to a number using myval = e.documentSubmitted.primarykey pk = convert_type("myval","N")