This is the variation of the question that I had earlier posted and it is also related to Search Spec but this time it is conflicting Search Spec on Applets that come into picture.

Question

I have a view with two applets one list on top [Applet 1] and one form at bottom [Applet 2] based on same BC. These 2 applets have different search specification
            Applet 1 search spec is [Type] = ‘1’
            Applet 2 search spec is [Type] = ‘2’

When we open this view which data I will see
          [poll=4]

Please Answer the poll before seeing the Answer.


Answer:
Option 3 – data with Type = 2

Reason:

This has got to do how Applets are rendered. They are rendered from Top to Bottom. So we have records on BC with Type 1 and Type 2 as both the applets are based on same BC it will result in execution of Search Spec on both applets.

So, when the Top Applet is rendered it will show records of Type 1 but as soon as SQL for Applet 2 is going to executed it will result in records to be filtered for Type 1 and only Type 2 will be displayed which means the Search Spec of Applet 1 is going to be overridden by Applet 2.

Initialy when answering this question I had thought it might result in OR condition in SQL for both applets but it doesn’t. SQL for applets are executed one at a time so the last one overrides the previous one. To, be honest I have never tried this practically but all the research I had done points towards this answer only.

So, If you try this practically and find out something more or something different do let us all know with the help of comments.

OkAvarageGoodVery GoodExcellent (4 votes, average: 4.5 out of 5)
Loading ... Loading ...

Related Posts