Filtering rows in the action-row

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

Filtering rows in the action-row

Bruno Busco
Hi,
please could someone gine me a hint?

I have a ListForm where most of the fields are from an entity but a
couple of them that are set in a row-action script looking into other
entities.

How could I filter the list rows on the looked up values?

I mean: I cannot add conditions in the <action> block of the form
because the field values are calculated in the row-actions.
Is there a way to have the row-action to make the test on the
calculated field value and, if true, skip the row and not insert in
the list?

Many thanks,
Bruno
Reply | Threaded
Open this post in threaded view
|

Re: Filtering rows in the action-row

Jacopo Cappellato-4
Hi Bruno,

it is not exactly the same, but have a look at the form definition  
"UpdateProductFacilityLocations" in the file product/webapp/product/
ProductForms.xml
The field "showPosition1" is used to hide some fields.

Ciao,
Jacopo

On Feb 7, 2009, at 3:17 PM, Bruno Busco wrote:

> Hi,
> please could someone gine me a hint?
>
> I have a ListForm where most of the fields are from an entity but a
> couple of them that are set in a row-action script looking into other
> entities.
>
> How could I filter the list rows on the looked up values?
>
> I mean: I cannot add conditions in the <action> block of the form
> because the field values are calculated in the row-actions.
> Is there a way to have the row-action to make the test on the
> calculated field value and, if true, skip the row and not insert in
> the list?
>
> Many thanks,
> Bruno


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

Re: Filtering rows in the action-row

Bruno Busco
Hi Jacopo,
thank you for the hint.
In this case the condition valutaded in the row-actions is used to hide a field.
What I am trying to do is to not show the complete row as it were
excluded by the intial condition.

May be there is a different way to achieve this?

Ciao,
Bruno

2009/2/7 Jacopo Cappellato <[hidden email]>:

> Hi Bruno,
>
> it is not exactly the same, but have a look at the form definition
> "UpdateProductFacilityLocations" in the file
> product/webapp/product/ProductForms.xml
> The field "showPosition1" is used to hide some fields.
>
> Ciao,
> Jacopo
>
> On Feb 7, 2009, at 3:17 PM, Bruno Busco wrote:
>
>> Hi,
>> please could someone gine me a hint?
>>
>> I have a ListForm where most of the fields are from an entity but a
>> couple of them that are set in a row-action script looking into other
>> entities.
>>
>> How could I filter the list rows on the looked up values?
>>
>> I mean: I cannot add conditions in the <action> block of the form
>> because the field values are calculated in the row-actions.
>> Is there a way to have the row-action to make the test on the
>> calculated field value and, if true, skip the row and not insert in
>> the list?
>>
>> Many thanks,
>> Bruno
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Filtering rows in the action-row

David E Jones-3

Right now there is no "row-condition" element or something like that  
(which could be checked after the row-actions). We could add that sort  
of thing, or you could create a view-entity so the calcs and what what  
are done in the database, or even have a simple-method or script run  
as an action to prepare a List of Maps that have the derived data in  
them and are pre-filtered and such. You don't have to use the results  
of a query for a list form, you can use any List of Maps with a row of  
results for each Map in the List.

-David


On Feb 7, 2009, at 12:35 PM, Bruno Busco wrote:

> Hi Jacopo,
> thank you for the hint.
> In this case the condition valutaded in the row-actions is used to  
> hide a field.
> What I am trying to do is to not show the complete row as it were
> excluded by the intial condition.
>
> May be there is a different way to achieve this?
>
> Ciao,
> Bruno
>
> 2009/2/7 Jacopo Cappellato <[hidden email]>:
>> Hi Bruno,
>>
>> it is not exactly the same, but have a look at the form definition
>> "UpdateProductFacilityLocations" in the file
>> product/webapp/product/ProductForms.xml
>> The field "showPosition1" is used to hide some fields.
>>
>> Ciao,
>> Jacopo
>>
>> On Feb 7, 2009, at 3:17 PM, Bruno Busco wrote:
>>
>>> Hi,
>>> please could someone gine me a hint?
>>>
>>> I have a ListForm where most of the fields are from an entity but a
>>> couple of them that are set in a row-action script looking into  
>>> other
>>> entities.
>>>
>>> How could I filter the list rows on the looked up values?
>>>
>>> I mean: I cannot add conditions in the <action> block of the form
>>> because the field values are calculated in the row-actions.
>>> Is there a way to have the row-action to make the test on the
>>> calculated field value and, if true, skip the row and not insert in
>>> the list?
>>>
>>> Many thanks,
>>> Bruno
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Filtering rows in the action-row

Bruno Busco
Thank you David,
yes the pattern of having a script that prepares data in a list and
then pass it to the form is clear to me.
But since the row skipping, based on a two fields comparison, would be
the only reason to write this script, I was just wondering if there
was a simple "row-condition" (as you propose the name) to easily skip
the record in the row-action that I already have in place.

From your answer I see that the "row-condition" is something you think
a valid pattern to implement, in this case I will put a +1 on that.
;-)

Thank you,
Bruno


2009/2/7 David E Jones <[hidden email]>:

>
> Right now there is no "row-condition" element or something like that (which
> could be checked after the row-actions). We could add that sort of thing, or
> you could create a view-entity so the calcs and what what are done in the
> database, or even have a simple-method or script run as an action to prepare
> a List of Maps that have the derived data in them and are pre-filtered and
> such. You don't have to use the results of a query for a list form, you can
> use any List of Maps with a row of results for each Map in the List.
>
> -David
>
>
> On Feb 7, 2009, at 12:35 PM, Bruno Busco wrote:
>
>> Hi Jacopo,
>> thank you for the hint.
>> In this case the condition valutaded in the row-actions is used to hide a
>> field.
>> What I am trying to do is to not show the complete row as it were
>> excluded by the intial condition.
>>
>> May be there is a different way to achieve this?
>>
>> Ciao,
>> Bruno
>>
>> 2009/2/7 Jacopo Cappellato <[hidden email]>:
>>>
>>> Hi Bruno,
>>>
>>> it is not exactly the same, but have a look at the form definition
>>> "UpdateProductFacilityLocations" in the file
>>> product/webapp/product/ProductForms.xml
>>> The field "showPosition1" is used to hide some fields.
>>>
>>> Ciao,
>>> Jacopo
>>>
>>> On Feb 7, 2009, at 3:17 PM, Bruno Busco wrote:
>>>
>>>> Hi,
>>>> please could someone gine me a hint?
>>>>
>>>> I have a ListForm where most of the fields are from an entity but a
>>>> couple of them that are set in a row-action script looking into other
>>>> entities.
>>>>
>>>> How could I filter the list rows on the looked up values?
>>>>
>>>> I mean: I cannot add conditions in the <action> block of the form
>>>> because the field values are calculated in the row-actions.
>>>> Is there a way to have the row-action to make the test on the
>>>> calculated field value and, if true, skip the row and not insert in
>>>> the list?
>>>>
>>>> Many thanks,
>>>> Bruno
>>>
>>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Filtering rows in the action-row

Jacopo Cappellato-4
It would be interesting, together with the row-condition pattern, to  
add also different row definitions inside of the same form.
For example
if row-condition for row "oddRow" then render fields in the "oddRow"  
row; if row-condition for row "evenRow" then...

Jacopo

On Feb 8, 2009, at 8:08 AM, Bruno Busco wrote:

> Thank you David,
> yes the pattern of having a script that prepares data in a list and
> then pass it to the form is clear to me.
> But since the row skipping, based on a two fields comparison, would be
> the only reason to write this script, I was just wondering if there
> was a simple "row-condition" (as you propose the name) to easily skip
> the record in the row-action that I already have in place.
>
> From your answer I see that the "row-condition" is something you think
> a valid pattern to implement, in this case I will put a +1 on that.
> ;-)
>
> Thank you,
> Bruno
>
>
> 2009/2/7 David E Jones <[hidden email]>:
>>
>> Right now there is no "row-condition" element or something like  
>> that (which
>> could be checked after the row-actions). We could add that sort of  
>> thing, or
>> you could create a view-entity so the calcs and what what are done  
>> in the
>> database, or even have a simple-method or script run as an action  
>> to prepare
>> a List of Maps that have the derived data in them and are pre-
>> filtered and
>> such. You don't have to use the results of a query for a list form,  
>> you can
>> use any List of Maps with a row of results for each Map in the List.
>>
>> -David
>>
>>
>> On Feb 7, 2009, at 12:35 PM, Bruno Busco wrote:
>>
>>> Hi Jacopo,
>>> thank you for the hint.
>>> In this case the condition valutaded in the row-actions is used to  
>>> hide a
>>> field.
>>> What I am trying to do is to not show the complete row as it were
>>> excluded by the intial condition.
>>>
>>> May be there is a different way to achieve this?
>>>
>>> Ciao,
>>> Bruno
>>>
>>> 2009/2/7 Jacopo Cappellato <[hidden email]>:
>>>>
>>>> Hi Bruno,
>>>>
>>>> it is not exactly the same, but have a look at the form definition
>>>> "UpdateProductFacilityLocations" in the file
>>>> product/webapp/product/ProductForms.xml
>>>> The field "showPosition1" is used to hide some fields.
>>>>
>>>> Ciao,
>>>> Jacopo
>>>>
>>>> On Feb 7, 2009, at 3:17 PM, Bruno Busco wrote:
>>>>
>>>>> Hi,
>>>>> please could someone gine me a hint?
>>>>>
>>>>> I have a ListForm where most of the fields are from an entity  
>>>>> but a
>>>>> couple of them that are set in a row-action script looking into  
>>>>> other
>>>>> entities.
>>>>>
>>>>> How could I filter the list rows on the looked up values?
>>>>>
>>>>> I mean: I cannot add conditions in the <action> block of the form
>>>>> because the field values are calculated in the row-actions.
>>>>> Is there a way to have the row-action to make the test on the
>>>>> calculated field value and, if true, skip the row and not insert  
>>>>> in
>>>>> the list?
>>>>>
>>>>> Many thanks,
>>>>> Bruno
>>>>
>>>>
>>
>>


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

Re: Filtering rows in the action-row

Jacques Le Roux
Administrator
+1

Jacques

From: "Jacopo Cappellato" <[hidden email]>

> It would be interesting, together with the row-condition pattern, to  
> add also different row definitions inside of the same form.
> For example
> if row-condition for row "oddRow" then render fields in the "oddRow"  
> row; if row-condition for row "evenRow" then...
>
> Jacopo
>
> On Feb 8, 2009, at 8:08 AM, Bruno Busco wrote:
>
>> Thank you David,
>> yes the pattern of having a script that prepares data in a list and
>> then pass it to the form is clear to me.
>> But since the row skipping, based on a two fields comparison, would be
>> the only reason to write this script, I was just wondering if there
>> was a simple "row-condition" (as you propose the name) to easily skip
>> the record in the row-action that I already have in place.
>>
>> From your answer I see that the "row-condition" is something you think
>> a valid pattern to implement, in this case I will put a +1 on that.
>> ;-)
>>
>> Thank you,
>> Bruno
>>
>>
>> 2009/2/7 David E Jones <[hidden email]>:
>>>
>>> Right now there is no "row-condition" element or something like  
>>> that (which
>>> could be checked after the row-actions). We could add that sort of  
>>> thing, or
>>> you could create a view-entity so the calcs and what what are done  
>>> in the
>>> database, or even have a simple-method or script run as an action  
>>> to prepare
>>> a List of Maps that have the derived data in them and are pre-
>>> filtered and
>>> such. You don't have to use the results of a query for a list form,  
>>> you can
>>> use any List of Maps with a row of results for each Map in the List.
>>>
>>> -David
>>>
>>>
>>> On Feb 7, 2009, at 12:35 PM, Bruno Busco wrote:
>>>
>>>> Hi Jacopo,
>>>> thank you for the hint.
>>>> In this case the condition valutaded in the row-actions is used to  
>>>> hide a
>>>> field.
>>>> What I am trying to do is to not show the complete row as it were
>>>> excluded by the intial condition.
>>>>
>>>> May be there is a different way to achieve this?
>>>>
>>>> Ciao,
>>>> Bruno
>>>>
>>>> 2009/2/7 Jacopo Cappellato <[hidden email]>:
>>>>>
>>>>> Hi Bruno,
>>>>>
>>>>> it is not exactly the same, but have a look at the form definition
>>>>> "UpdateProductFacilityLocations" in the file
>>>>> product/webapp/product/ProductForms.xml
>>>>> The field "showPosition1" is used to hide some fields.
>>>>>
>>>>> Ciao,
>>>>> Jacopo
>>>>>
>>>>> On Feb 7, 2009, at 3:17 PM, Bruno Busco wrote:
>>>>>
>>>>>> Hi,
>>>>>> please could someone gine me a hint?
>>>>>>
>>>>>> I have a ListForm where most of the fields are from an entity  
>>>>>> but a
>>>>>> couple of them that are set in a row-action script looking into  
>>>>>> other
>>>>>> entities.
>>>>>>
>>>>>> How could I filter the list rows on the looked up values?
>>>>>>
>>>>>> I mean: I cannot add conditions in the <action> block of the form
>>>>>> because the field values are calculated in the row-actions.
>>>>>> Is there a way to have the row-action to make the test on the
>>>>>> calculated field value and, if true, skip the row and not insert  
>>>>>> in
>>>>>> the list?
>>>>>>
>>>>>> Many thanks,
>>>>>> Bruno
>>>>>
>>>>>
>>>
>>>
>
>