Come for answers, stay for best practices. All we're missing is you.
Forum question posted -
I am trying to run a test where I create a variable (in this case it's the work order number) and use that variable to pass in the wonum to the sql assertion. I followed the document for creating variables and using those variables, but can't seem to get it correct. Can you tell me if this is possible or give me some example syntax please?
Created my variable : {"index":53,"event":"makeVariable","id":"maf77dfec-tb","params":["WONUM"]},
Here's where I tried to use that variable within my sql assertion.
{"index":64,"event":"assertAttributeTrue","id":"m6858fd2-tb","attribute":"value","value":"sql: select schedstart from maximo.workorder where wonum=","params":["$WONUM"]","comment":"test sched start is equal to required date"}
Thanks.
Looking at the example you provided, it looks like you're trying to verify that the results of your query match what is in the field specified. There seems to be an extra parameter in there and that the sql query did not contain the variable. You should be able to get it to work like this:
{"event":"assertAttributeTrue", "id":"m6858fd2-tb","attribute":"value", "value": "sql:select schedstart from maximo.workorder where wonum='{$WONUM}'","comment":"test sched start is equal to required date"}
Please let me know if that doesn't work.
Thanks,
Kristin2)That seems to be running now. Thank you for the quick response!