How to add column to result in simple service

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to add column to result in simple service

Radoslav Tomko
Hi,

Is there a way to add column to result returned by "performFindList" in
simple service?

I have this part in simple service getting data from
"AcctgTransAndEntries" entity:
       
        ...
        ...
        <set field="input.entityName" value="AcctgTransAndEntries"/>
        <set-service-fields service-name="performFindList"    
map-name="input" to-map-name="lookupParams"/>
        <call-service service-name="performFindList"
in-map-name="lookupParams" transaction-timeout="7200">
            <results-to-map map-name="result"/>
        </call-service>      

After this I get a  result and I want to loop through it and add field
to each row,
but Idon't know how or if it is possible.

            <iterate entry-name="listItem" list-name="result.list">
                   <!-- somehow add new fields to listItem -->
            </iterate>

When I try to use  in loop this:
      <set field="listItem.newField" value="test value" type="String"/>

I got an error that field "newField" does not exist in entity
"AcctgTransAndEntries" (and it's true :-) )

Thanks in advance.

Radoslav Tomko

Reply | Threaded
Open this post in threaded view
|

Re: How to add column to result in simple service

guo weizhan
I don't think you can add new colume the results of performFindList, the
results is the GenericValue list and the columes of the GenericValue is base
the entity.

What's the new colume doing for?



2009/3/15 Zhavic Tomek <[hidden email]>

> Hi,
>
> Is there a way to add column to result returned by "performFindList" in
> simple service?
>
> I have this part in simple service getting data from "AcctgTransAndEntries"
> entity:
>             ...
>       ...
>       <set field="input.entityName" value="AcctgTransAndEntries"/>
>       <set-service-fields service-name="performFindList"
> map-name="input" to-map-name="lookupParams"/>
>       <call-service service-name="performFindList"
> in-map-name="lookupParams" transaction-timeout="7200">
>           <results-to-map map-name="result"/>
>       </call-service>
> After this I get a  result and I want to loop through it and add field to
> each row,
> but Idon't know how or if it is possible.
>
>           <iterate entry-name="listItem" list-name="result.list">
>                  <!-- somehow add new fields to listItem -->
>           </iterate>
>
> When I try to use  in loop this:
>     <set field="listItem.newField" value="test value" type="String"/>
>
> I got an error that field "newField" does not exist in entity
> "AcctgTransAndEntries" (and it's true :-) )
>
> Thanks in advance.
>
> Radoslav Tomko
>
>