Hey cst99003
you'll have to forgive me - I'm quite literal so I'm struggling a little still.- my ADHD doesn't help me to concentrate either.
You mention database, datasource, spreadsheet
"The datasource from the database has one to many records" - are you using a datasource step object in your test case? Can you please describe the steps in your test case just so I have a littel background?
From the mention of datasource and database - are you using a Data connection datasource object and using this to connect to a database? If yes - can I assume you are using this to build the content of your request?
you mention " The DeathPayOption value is in the spreadsheet so i want to use that to get the correct attribute." - what spreadsheet? I'm sorry - you never mentioned a spreadsheet before - are you using a spreadsheet as your datasource - or are you using a database? Confused... ;)
Is it REST? SOAP?
Are you doing a POST? or is it a GET?
Essentially - you are doing some sort of REQUEST that is returning a .json body (so I'm assuming REST, not SOAP). in this .json body you have >1 record returned.
You are saying one option fails because you can assert on $['CalculatedOptions'][0]['DeathPayOption'][0]['OptionNum'] but you also have a record at $['CalculatedOptions'][0]['DeathPayOption'][1]['OptionNum'] - can you not just assert on this second instance of OptionNum to prove the value is correct?
It would help a lot if I knew what the content of your datasource is. you mention you are trying to assert the OptionNum attribute against ${DataSource#DO_OPTIONNUM} - but I don't know what DO_OPTIONNUM actually is.
I'm sorry - some of other lads who are cleverer than me might be able to infer the content - but I need it laying out before I can visualise.
Thanks man,
richie