Dataset as argument to function

Hello !

I am trying to add two columns in the quote line table showing unit setup cost and unit prod cost for each quoteDtl line.

As such I made a function taking and returning a dataset in parameter :
image

In application studio i set an event on GetById to send the full dataset to the function, and uses it result :
image
image
image

But when i try the quoteDlt part of the dataset is empty, so nothing happens. How do I get the full dataset ?
image
image

Thanks in advance !

You need to add the quote adapter to your Function and then you can specify the actual quote tableset as your parameter.

If all you want is QuoteDtl why not just send only QuoteDtl?

image

If I do so I get this error :
image

I guess this is because Quote is the dataset, and QuoteDtl is a dataview in the application referencing a table of the dataset Quote.

I just don’t get why there are rows missing from it.

Indeed it’s in the quote entry

Is this just in Quote Entry?

There is no column in the tableset for the data I am trying to show, and I cannot add columns to it. So I would have to cast the tableset to dataset then add the columns right ?

This makes no difference. I send dataviews to functions all the time with the syntax shown.

2 Likes

Thanks a lot it did work !

I completely forgot the power of curly braces as it actualy sent data without them ! Glory to the braces !

1 Like

Curly braces to send the dataview.
No curly braces to send the dataset.

You know. To make everything confusing for the users. LOL

4 Likes

Then its working !