Drop down menu question

15 Jun '12, 04:26 AM
18,968 Views
Forum Forum Starter - Level 1

I have a form where I want to have a drop down menu and I want to add multiple constant values to it. I am not sure how it is done. I have created an entry unit and added a selection field . In the incoming link to the entry unit, I have been trying to define the constant value through parameter coupling. It works fine for one constant value .But how can I have multiple values to be displayed in drop down box with out having to refer to an entity in database? It would be utter useless to add such an entity in my case.

 
x 1
Follow
Answer Answer at this question and get points!
No Forum Badges

There are a couple of options for defining static choices that do not involve Data Model Entities.

The first option is to right-click on the Selection Field and choose Add > Slot to explicitly define the field slots. Slots can be considered a kind of ""sub-field"" and, in case of a Selection Field, they can be marked as Label, Output or both. The label slot is the one holding the values that are displayed to the user, while the output slot is the one holding the values that are sent to the server.

After defining slots, you just enter the fixed values you want in their Value property, separating them with a pipe character (|).

The following example shows how to define a selection fields for days of the week that sends to the server a number for each day.

If you need a more complex logic for defining static values, another option is to use a Script Unit to feed the values to the Selection Field, by returning them as arrays (this is why your attempt with link coupling did not work - multiple values must be passed as arrays).

   
x 3
Answer at this question and get points!

Related questions

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 Autocomplete template Automatic date in form Automatic file upload BPMN: URL field ckeditor - change directory for the browser Clean a form Como crear cambio de contraseƱa 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 coupled mandatory fields Cryptic error when submitting a form Disabilitare campi durante evento AJAX 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 Field as link soruce Form element Form template Getting the absolute path of a RTXBLOBData Hide form until a flow is triggered Hiding form components based on page conditions Hierarchy component How I can receive the primary key value after adding into database from OK Port. How to redirect to the correct site view after a successful login attempt input mask Multi Entry Unit: How to forward only checked rows? Multi-Image Upload Multiple forms on one page. HTML5 input attributes. Possible? (2 questions) multi selections field problem Multi Selects didn't work in update page Prelevare la chiave del record da una Selection Field in una Multiple Form Problem saving multi selection from input Progress bar when uploading big file(s) in a form? Pulire URL Redirecting users to another site view Resize fields Search by Selector component does not work selection fields on cascade Select multiple files for upload Setting Upload directory Showing items that have a relation with an entity Slot in Selection Field 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 Uso de la componente chart de webRatio Validacion validation fields Value Length (Min) fails to validate when field is empty? 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