cancel
Showing results for 
Search instead for 
Did you mean: 

How to bring values with out loop as per selection criteria

kngupta141
Participant
0 Kudos

Hi Everyone,

We are doing some re-design in IPAD in that i am facing an issue. There is one scenario where sub-action loop has been used(it is an existing functionality). We dynamically bring the question in this loop based on certain seller phase.

Now they want to bring everything in one screen it self. The table they are looping is complex table.

Any ideas how we can achieve this problem.

The idea which i have:

During fetch i need to loop and this complete table and get these values in to variables, so that i can hide remaining fields based. Is there any other way do it.

Regards,

Gupta

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

One suggestion would be to still store all the data in the Complex Table but then at the start of your action, loop over the CT and populate an object collection with just the data you need based on the selection criteria.  Then your screen can display a tile list of all the questions on one screen based on that temporary object.

This allows you to perform the work offline rather than having to populate it via a fetch.

--Bill

kngupta141
Participant
0 Kudos

Thanks Bill for the quick response.

here is the problem

my selection criteria also exist in the same screen. In that case how we will loop still

Regards,

Gupta

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

That could still possibly work.  When you make your selection criteria the user would click on a button to refresh the list which would empty the temporary collection and repopulate it based on the selection criteria.

--Bill

kngupta141
Participant
0 Kudos

Hi Bill,

Is it possible to give some steps?

Sorry i am new to Agentry.

Regards,

Gupta

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

It's difficult to really give steps without knowing your application better but here goes my best shot at it.

In terms of underlying structures on the client, I am assuming you have a questionsCT, a question object (with the desired fields to displa and a tempQuestions collection on your Main Object to hold the displayed questions.

1) Create an Edit Transaction on the main object with one property of the tempQuestions collection.  This property should be set to Auto-Initialize.  When this transaction is involved from an action and applied it will clear the tempQuestions collection.

2) On the question object, create an Add transaction to populate the object fields from the corresponding questionCT current record.  For each of the transaction properties set the Initial Value to "From a different object property" and then browse to the Complex Tables selecting your questionsCT -> current record -> field name.

3) Create your Add question Action to call the AddQuestion Transaction and Apply.  This will be the action called from your subaction loop.

4) Create your refresh action with the following steps

    a) Transaction - (#1)

    b) Apply

    c) Sub-Action

        c1) Execution Type: Loop over collection

        c2) Collection: Browse and select your questionsCT

        c3) Execution Rule: Define a new rule to return true if the current record meets your selection criteria

        c4) Action: Seelct your Add question action (#3)

On your detail screen, I am assuming you will have a dropdown or some similar way to set the selection criteria.  Create a button field that will call your refresh action (#4) and add a tile list control targeting the tempQuesitons collection as it's source.

This should hopefully get you started in the right direction.

--Bill

kngupta141
Participant
0 Kudos

Fixed the problem by using update rule based on selection criteria.

Answers (0)