Multi Entry Unit: How to forward only checked rows?

05 Oct '12, 02:16 PM
44,637 Views
No Forum Badges

Hi,

I want to forward only the checked rows of a multi entry unit to a create unit. How can I do this?

Here is the example: alt text

If I press the button only the data of the first two rows should be forwarded by the link to the create unit:

alt text

Following the parameters coupling: alt text

In this constellation the create unit always create an entry for all three rows and not only for the two rows checked.

Thank´s for your help!

Felix

 
x 1
Follow
Answer Answer at this question and get points!
Forum Hero - Level 9

Hi,

the Checked Opjects parameter returns the key attributes values of the checked objects. It is useful to define the rows that you want to modify and save with the Modify Unit.

The Multi Entry Unit returns for each Field the arrays of values for all rows.

If you want to save only the checked items you have to manage the arrays and discard the elements that are not in the checked objects array.

Suppose to have a Multi Entry Unit with a "name" Field.

In this case you can use a Script Unit and write a code like this:

#input int[] checkedOID, String[] name
#output String[] newName

def newName = [] 
def count = 0

checkedOID.eachWithIndex{it, idx -> if(it != null)
    {
        newName[count] = name[idx]
        count++;
    }

}

return ["newName":newName]

In this example will be returned a new list of names related to the checked rows.

   
x 1
Answer at this question and get points!

Related questions

Acceder a diferentes site views/ Acces to diferents site views Add to Bag link in ACME Ajax and FCK Editor (WebRatio 5.x) Ajax onchange and jQuery 2.x (with migrate plugin) incompatible Ajax on change selection field and modify units any webratio book ? Asking For a Book Attribute comparison in a selector unit Autocomplete template Automatic date in form Automatic file upload BPMN: URL field ckeditor - change directory for the browser Clarification about the NoOperation unit Clean a form Codigo QR Como crear cambio de contraseña Como hacer un menu en webratio? Como tener dos botones juntos en un formulario independientes de una accion? Como usar la función autocomplete en un field Compare with the current time Conditional Expression "greater than 0" on null fields Connect more query unit Content module page variable won't assign. coupled mandatory fields Create Unit with Date (Year only) Cryptic error when submitting a form Custom Attributes Condition Database Database List is not showing up in App Emulator Data is always created doubled Data Management: Updating Data - Attachments - Updating Data Sample Project Final Description: Unknown tag 'wr:LinkResource' Disabilitare campi durante evento AJAX Drop down menu question Dudas sobre modelado(Data Flow,Forms y Operation Create) Dynamic attribute/field names. Possible? Dynamic instantiation of fields on a page for any Class type Empty record mistakenly saved entry form logic. Entry Unit - Default field timestamp Entry Unity, Field Date Type Error en_US codify problem Export XML external link.= Field as link soruce Filter information in a Simple List Format currency Form element Form template forward/backward navigation and bookmark in ajax web app "Generation Error" with Generate and Run Generation options problem get the attachment files of an email Getting the absolute path of a RTXBLOBData Get Unit problem Get Year from Date Help for connect public and private site views Hide form until a flow is triggered Hiding form components based on page conditions Hierarchy component How can i create pagemenu or landmarkmenu with multiple levels. How does WebRatio represent these IFML elements? / ¿Cómo representa WebRatio estos elementos IFML? How I can receive the primary key value after adding into database from OK Port. How i can reuse modules in multiple projects? How to define the sequence of execution units on a page? How to display the attributes of a related entity. How to filter imported attributes? How to include Selector Unit result in Mail Unit Body? How to pass vars to a alternative page How to process IFML Model (build with Eclipse editor) with ATL How to redirect to the correct site view after a successful login attempt How to show a page based on a boolean? How to speed up the "last" link using PowerIndexUnit for lots of records How to store data related to an entity in relationships in a project web input mask Insert data into database Insert master page to many hybrid modules Integrating a BPM model into an existent WebML model JSON I/O Unit e informazioni derivate KO Links in Selector Unit Landmark in hybrid module Link localization Links from Index unit with condition Link Visibility Condition Power Index Unit Mail multipla maintain the record order in a sortable list Math Unit to update attributes of an entity? [MOBILE] How I extract information from JSON client side? Modifica Entità tramite file xml Multi-Image Upload multi-lingual product description Multiple forms on one page. HTML5 input attributes. Possible? (2 questions) multi selections field problem Multi Selects didn't work in update page Non riesco a fare funzionare Xml out unit Parametrizzazione Selector Unit Prelevare la chiave del record da una Selection Field in una Multiple Form Problem Example create Unit (no company in employee table) Problem in adding diagrams in IFML Editor (Eclipse) Problem saving multi selection from input Problem with query unit! Problem with Scroller Unit Progress bar when uploading big file(s) in a form? Pulire URL query a database Question about Site Views Redirecting users to another site view Rename passing attributes Replace ID by its value in another table Resize fields Search by Selector component does not work Select between parameters selection fields on cascade Select multiple files for upload Selector unit doesn't return any value in hybrid module Sending mails is not working Sending mails with gmail is not working Setting the Default link for a Switch unit Setting Upload directory show/hide fields on button click (registration page) Showing items that have a relation with an entity Slot in Selection Field [solved] all links transparent, why ? Something leads to wrong condition expression evaluation. sumar atributos de una tabla filtrado por Role Condition Sum entity's values Transportation Link issue Unique Fields Update fields based on selection of other fields Updating attributes of an entity upload file and the move it to other location upload file html Uppercase using relationship role conditional with null Uso de la componente chart de webRatio usuarios y grupos utilizzo componenti database Validacion validation fields Value Length (Min) fails to validate when field is empty? Visibility Condition on Multiple Links From Index Unit WebRation - Create Navigation diagram What are the new features of WebRatio 6.1? which of these three models is closer to webratio/ifml way of creating web applications