TCA.vtssearchrow not returning data

trying to change the current TC.vtssearchrow to TCA.vtssearchrow.

original code

vtscolumns=TC.vtcSearchRow("p_UserNum","152666",",","068_VTS")

new code

vtscolumns=TCA.vtcSearchRow("p_UserNum","152666",",","068_VTS").then(function(vtscolumns){
 TCA.done(vtscolumns);
}).catch(function(error) {
 TCA.doneWithError(error);
});

the new command is returning [object Object] , the same as the original code

with the original code, I used this command to get the data into a string I can parse

vtsf = JSON.stringify(vtscolumns);

old code returns a string like 

{"p_Password":"12345","p_UserFirstName":"APerf","p_UserID":"APerfTester00001@xxx.com","p_UserLastName":"Tester00001","p_UserNum":"152666"}

the new TCA code returns {} ... which assume means the TCA.vtssearchrow is not returning a value.

How can I check the value in the TCA.done variable or the error variable.   they are not showing any values in the Inspector Panel when in Script Developer.

Thanks.

Tags:

Parents
  • 0

    the is the way I understand the documentation.   it says Returns the whole row values if the value of columns exist. For example: {col1:"a", col2:"b",col3:"c"}. Otherwise, it returns an empty value.

    then it goes further and says

    When using asynchronous APIs in places where a return value from evaluating JavaScript is needed, for example, in step argument fields, the return value must be returned by calling TCA.done(result) with the return value as the result argument.

    My assumption is the returned value would be the variable that is used in the TCA.done() statement which goes with the function() statement.  I am not seeing any value being passed in that variable.   Which is why I am asking for help.

  • 0   in reply to 

    You are right about the general statement in respect to the TCA functions, but the function documentation for the the function in question is different so it might be an exception...

    How to ask questions

    Reward contributions via likes or 'verified answers'

Reply Children