cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any possibility to select multiple entries in complex table dropdown?

sravanthi_polu
Contributor
0 Kudos

Hi All,

    

          Is there any possibility to add check boxes for entries in complex table drop down.The requirement is,the data should be fetched into complex table based on condition and for each record fetched a check box should be added ,the user should be able to select multiple check boxes and these selected entries should be concatenated and updated to back end non-sap system(MS Sql).I have tried with many options(complex table drop down,complex table search,complex table tree etc) but could not find a solution.Please let me know , whether this kind of scenario is possible or not.

          Thanks in advance

Regards,

Sravanthi Polu

Accepted Solutions (1)

Accepted Solutions (1)

mark_pe
Active Contributor
0 Kudos

Just throwing an idea out there..

In Agentry a List screen can show (display) the values from a fetch, object or transaction.

Let Fetch download properties (Each properties correspond to a column in the backend) from the database backend (it could be MySQL).

Assuming you have created your logic to pre-download values from the backend based on condition.

The user will see on the screen the different rows displayed for this fetch properties.

You may create an Action with a Subaction step to do something like update/concatenate to the backend.

The user just simply needs to select multiple rows in the list screen to do a subaction to process the data. There is an option to do the work for "Selected" values of the list.

So in the example above, let us say I downloaded from a fetch 10 rows.

The user selected (using multiselect) the items on the list tile or list screen then the subAction will run an Action to do the concatenating or something against your backend.

Of course the action of your concatenate is after the subaction to append the data of your backend database.

Another thing about Creating a list tile is you can define adding buttons on the screen.

You may add a checkbox for the value you fetch.. But not sure if you still need this if you can already multiselect from the list view to do a subaction..

Just some ideas that I saw from different System Integrators or Consulting project...

You may choose what you want to do..

Again, just throwing some ideas your way to use fetches to populate a ListScreen or List Tile to do multi Select or because it is using a Detailed Screen (ListTile) you may have options to add check boxes or do multi-select..

Let us know in the forum if this technique may work for your requirements..

sravanthi_polu
Contributor
0 Kudos

Hi Mark,

Thanks for the reply.I have tried with sub action , but it does not meet the requirement because the complex table drop down field is in transaction.I think it may not be possible to add a list screen as child screen in transaction screen . For this i have designed an another transaction ,screen set and action exclusively for that drop down field and i have mapped that action in hyperlinks for the field in transaction.But the action is not working.Is it possible to call another transaction from a transaction.

mark_pe
Active Contributor
0 Kudos

Another variant to this technique if you are referring to a Transaction (which should have a detailed screen assign to it):

  • You will have a complex table field (Drop down)
  • You will have a list tile field (List View on another field - same screen)
  • Have a button that is an Add action that takes the value of the complex table drop down and add it to a New Collection to populate the List view field (The list view is displaying this New collection)
  • So in theory it looks like:
    • CT (Data) field   =>   ListScreen(Collection)
      • Add button  =>  New data gets added to the List screen
  • Once you have the data that they need on a list screen you can do a subaction to work on all the data "Displayed" on the list screen to do your transaction processing.

That is the other idea that I saw other people do.

Answers (1)

Answers (1)

jason_latko
Advisor
Advisor
0 Kudos

Sravanthi,

What client platform are you using?  My answer will depend on the capabilities of your chosen platform (iOS, Android, PPC, Windows).


There is no way to multi-select in an Agentry complex table.  Like Mark suggested, instead of using a CT to hold your source data, download it using a fetch to an object collection in the Main Object, let's call the collection "SourceDataRows".


Depending on your platform, display the rows on a target screen type:  For smart phones, use a detail screen with a List Tile View control.  For Windows or WinCE (PPC), I would probably use a traditional List Screen, although the List Tile View control is supported on those platforms also.


Add a Boolean property to your "SourceData" Agentry Object called "Selected".  This will be the variable that holds whether the user has selected the row or not.


Let's concentrate on the List Tile View scenario.  Create a parent screen set called "TileList" that holds a detail screen.  Add a List Tile View control to this and set the dimensions to fill the entire screen.


Next create another Screen Set that displays the "SourceData" row fields you want to present to the user.  This child screen set is then tied to the parent List Tile View control on that control's "Settings" tab.  Add the relevant "SourceData" fields to the child screen, and also add the "Selected" Boolean as a Button field, then choose "Check Box" on the Button field's "Button" tab to make this a check box (rather than a radio button or push button).


Next create a silent edit transaction against your "SourceData" Object called "ToggleSelected".  I call it a "silent" transaction because it will not not use a screen to interact with or accept data from the user.  It has one property: Your "Selected" Boolean.  On the "Selected" property, change the Initial Value to "Rule After Data Entry" and create a new rule called "InitialValueSelected".  In this rule, create logic that toggles the checked state of the boolean from one to the other.  This can be done in a 4 line rule as follows:

IF
"SourceData" Object -> "Selected" Property
Constant "False"
Constant "True"

So add an IF first.  Under the IF, use the property browser to select the "SourceData" object and the "Selected" property.  Then add Constants for "False" and "True" under the IF.  This rule says that if the Boolean value of "Selected" is already "True", set it to "False", ELSE set it to "True".  Simple, right?


Next create an Action that will run this silent Transaction called "ToggleSelected".  It should accept an object type of "SourceData".  The action steps will be a Transaction that calls "ToggleSelected" with no screen, and the 2nd step will be an Apply.


Next add this Action as the single click action on your List Tile View Control on that control's "Settings" tab.  Do this by checking the "Actions can be executed by single click" check box on the same tab and then assigning the action on the bottom.  This will toggle the "Selected" check box every time the user clicks on a tile on the list, by running the action and the underlying transaction.  Note that the single click is not supported on WinCE.


Lastly, if you want to concatenate the results and send them in a single update to the backend database, you would create another action called "ConcatResultsLoop" and tie it to an Action or Toolbar button on your "TileList" Detail Screen that holds the List Tile View.  This action should hold a sub-action step that loops over the "SourceDataRows" collection.  Add an Execute rule to this step that only processes the rows that have the "Selected" property set to true.  This is a 1 line rule that says: "SourceData" Object -> "Selected" Property.  Execute rules evaluate in a Boolean context, so it will check the property and if true, the rule will return true and the row will be processed, else it will be skipped.  The sub-action should run another action called "ConcatenateData".  This action should run an edit transaction called "ConcatenateData" that works against the MainObject property "Results".  This transaction should have a "rule after data entry" rule on the "results" property that concatenates the existing "Results" data and adds any data from the current "SourceData" row we are looping over.  This way you will have one large string when the loop is done containing all the selected row data.  You can send this up to the database by running a final silent transaction called "SendData" that has your database backend step assigned to the transaction as an update step.  Run this transaction as the final step of your "ConcatResultsLoop" action.


Hopefully, this gives some more ideas about how you can use the available UI controls within Agentry to handle your requirements differently.  Let me know if you need clarification about any of these techniques.

Jason Latko (Senior Product Developer at SAP)