Need help with Or condition and performFind in form widget

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

Need help with Or condition and performFind in form widget

Jacopo Cappellato
Hi all,

I'm struggling with the following form definition:

<form name="ApproveRequirements" type="multi" use-row-submit="true"
target="approveRequirements" title="" list-name="listIt"
paginate-target="ApproveRequirements">
  <actions>
   <set field="entityName" value="Requirement"/>
   <set field="requestParameters.statusId" value="REQ_CREATED"/>
   <service service-name="performFind" result-map-name="result"
                                  result-map-list-name="listIt">
    <field-map field-name="inputFields" env-name="requestParameters"/>
    <field-map field-name="entityName" env-name="entityName"/>
   </service>
  </actions>
...

Now I need to change it to filter by statusId=REQ_CREATED OR
statusId=REQ_PROPOSED

Is there a way to do this?

Please help,

Jacopo
Reply | Threaded
Open this post in threaded view
|

Re: Need help with Or condition and performFind in form widget

cjhowe
I don't believe the performFind service supports or conditionals.
Without changing the performFind service, you can either use
entity-condition or run an additional service or script to filter your
performFind result set or a row-action script to go to the next
iteration if it doesn't meet your criteria perhaps.

--- Jacopo Cappellato <[hidden email]> wrote:

> Hi all,
>
> I'm struggling with the following form definition:
>
> <form name="ApproveRequirements" type="multi" use-row-submit="true"
> target="approveRequirements" title="" list-name="listIt"
> paginate-target="ApproveRequirements">
>   <actions>
>    <set field="entityName" value="Requirement"/>
>    <set field="requestParameters.statusId" value="REQ_CREATED"/>
>    <service service-name="performFind" result-map-name="result"
>                                   result-map-list-name="listIt">
>     <field-map field-name="inputFields"
> env-name="requestParameters"/>
>     <field-map field-name="entityName" env-name="entityName"/>
>    </service>
>   </actions>
> ...
>
> Now I need to change it to filter by statusId=REQ_CREATED OR
> statusId=REQ_PROPOSED
>
> Is there a way to do this?
>
> Please help,
>
> Jacopo
>

Reply | Threaded
Open this post in threaded view
|

Re: Need help with Or condition and performFind in form widget

David E Jones
In reply to this post by Jacopo Cappellato

One thing you can do is prepare the condition list separately and  
then use the executeFind service to run it.

Of course, you course you can always use entity-condition to manually  
map and run everything.

-David


On Mar 16, 2007, at 10:29 AM, Jacopo Cappellato wrote:

> Hi all,
>
> I'm struggling with the following form definition:
>
> <form name="ApproveRequirements" type="multi" use-row-submit="true"  
> target="approveRequirements" title="" list-name="listIt"
> paginate-target="ApproveRequirements">
>  <actions>
>   <set field="entityName" value="Requirement"/>
>   <set field="requestParameters.statusId" value="REQ_CREATED"/>
>   <service service-name="performFind" result-map-name="result"
>                                  result-map-list-name="listIt">
>    <field-map field-name="inputFields" env-name="requestParameters"/>
>    <field-map field-name="entityName" env-name="entityName"/>
>   </service>
>  </actions>
> ...
>
> Now I need to change it to filter by statusId=REQ_CREATED OR  
> statusId=REQ_PROPOSED
>
> Is there a way to do this?
>
> Please help,
>
> Jacopo


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Need help with Or condition and performFind in form widget

Jacopo Cappellato
David,

I will probably try with your former suggestion... the issue with the
latter is that some of the constraints are received from a search form,
and I was hoping to not deal with all of them.

Thanks,

Jacopo

David E. Jones wrote:

>
> One thing you can do is prepare the condition list separately and then
> use the executeFind service to run it.
>
> Of course, you course you can always use entity-condition to manually
> map and run everything.
>
> -David
>
>
> On Mar 16, 2007, at 10:29 AM, Jacopo Cappellato wrote:
>
>> Hi all,
>>
>> I'm struggling with the following form definition:
>>
>> <form name="ApproveRequirements" type="multi" use-row-submit="true"
>> target="approveRequirements" title="" list-name="listIt"
>> paginate-target="ApproveRequirements">
>>  <actions>
>>   <set field="entityName" value="Requirement"/>
>>   <set field="requestParameters.statusId" value="REQ_CREATED"/>
>>   <service service-name="performFind" result-map-name="result"
>>                                  result-map-list-name="listIt">
>>    <field-map field-name="inputFields" env-name="requestParameters"/>
>>    <field-map field-name="entityName" env-name="entityName"/>
>>   </service>
>>  </actions>
>> ...
>>
>> Now I need to change it to filter by statusId=REQ_CREATED OR
>> statusId=REQ_PROPOSED
>>
>> Is there a way to do this?
>>
>> Please help,
>>
>> Jacopo
>