User input in repeated grid to fill dynamic dropdown - orbeon

I am building an Orbeon form where people can add information to a repeated grid, e.g. Name, Age.
Later in the form, there will be a 'Friend' section that will reuse data from the repeated grid.
I can synchronize the data using <fr:synchronize-repeated-content>, but is it possible to reuse the data from the repeated grid in a dynamic dropdown instead?
A dynamic dropdown could make this form much shorter, compared to <fr:synchronize-repeated-content>, as only a few of the rows in the repeated grid will need more data later in the form (only few friends from a long list of names in the repeated grid).
It is currently not possible for this form to use any web services.

Currently, you can't directly populate a dropdown based on data entered in a repeated grid earlier in the form. As you suggested, using another repeated grid and <fr:synchronize-repeated-content> is a workaround. But being able to directly populate a dropdown would definitely make sense, and this is covered by request for enhancement 4182.

Related

Kendo UI Multiple Grid

I want to create a grid where it gets two entries to bind from two tables in the database, and save the result in another result table.
To explain more I have attached a picture of the needed grid,
So as you guys see in the picture, : 1) I want the servers list to be bound in the horizontal header (from servers table),2) and I want to bind the application list in the vertical row. That way I check inside the grid when an application is deployed on a server.
My question is how to achieve this? is there a kendo component or any other component that will help me doing this job?
A lot can depend on the data model.
The KendoUI PivotGrid https://demos.telerik.com/kendo-ui/pivotgrid/index might be what you need and works cleanly with categorical form data.
If you prepare your own pivoted data, as the results of a SQL Server pivot query, a normal KendoUI Grid may suffice.
If you prepare you own data, as the result of a dynamic pivot query, the columns could be different each time. You will need to learn about htmlhelper Grid, such as discussed in https://docs.telerik.com/aspnet-mvc/helpers/grid/how-to/Binding/grid-bind-to-datatable.
A dynamic data source can also be handled in just jQuery (with no htmlhelpers), such as discussed in https://www.telerik.com/blogs/dynamic-data-in-the-kendo-ui-grid

custom vaadin-grid filter for Polymer 1.0

I’m using the vaadin-grid#^3.0.2 in my polymer 1.0 project.
But I’m looking to create an on/off toggle button that will filter a column based on if the text in two columns are not a match. So if a row in column 1 contains text=“1.1.1” and that same row in column 2 contains text = “2.1.1" then I would keep this row displayed, and hide all other rows. I want to do this in javscript. I’m very new to the vaadin-grid (had so much previous experience with iron-data-table). Anyone have a suggestion on how I can access the filter function?
image of 2 different columns of versions
I tried using the standard filter element but it's too limiting because it only allows me to do string based filtering on just one-specific column, but it's not built so I can do a comparison between strings in two different columns.
<vaadin-grid-filter path="version" value="[[_filterVersion]]">
<input value="{{_filterVersion::input}}">
</vaadin-grid-filter>
One simple way to do filtering that looks at the values of two columns is to not use vaadin-grid-filter, rather just have a input field outside the grid, then filter the array bound to the grid's items property as needed.
<vaadin-textfield on-value-changed="_filterMethod"></vaadin-textfield>
_filterMethod(evt) {
this.gridItems = this.allItems.filter(it => it.col1 !== it.col2);
}
Although I may not fully understand your question as I don't why you are using an input field instead of a button. This filter method approach should work equally well if you call it from a button instead.

How to auto populate specific Google Form fields, based on dropdown choice

I use Google Forms regularly at work, and I think they are awesome, especially since I am a total newbie with coding. With a few good plugins for Forms and Sheets, I am able to generate contracts, invoices, and so on very easily, based on document templates.
To keep it short, here is my request:
I have a form, where I input the customer's details, and upon submission, an addon generates a gdoc, based on a template. Al working great so far. My problem is that we are generating many different documents for a single customer, so it becomes a repetitive and very time-consuming task, considering that I have 15-20 different input fields for a customer, plus specific input fields for each different document.
The first input filed in my form is "Customer Name" and I have managed to create a dynamic dropdown list, that takes it's information from a specific column in a Google Sheet.
My request: how could I auto populate specific input fields in my Google Form, so that, based on my dropdown choice, the auto completed information will match the corresponding row present in the Google Sheet.
I have attached 2 images for easier understanding:
You can actually do this with a simple vlookup:
note: I also always wrap my functions with and if statement that checks if there is text in the first field, so try:
pretend that your dynamic customer name is in cell A1:
customer vat formula -
=IF(ISTEXT(A1),VLOOKUP(A1,'Parteneri'!A:C,2,FALSE),)
customer city formula -
=IF(ISTEXT(A1),VLOOKUP(A1,'Parteneri'!A:C,3,FALSE),)

Looping through rows

I have an app that displays a number of rows of products. Right now it's hardcoded to use three html rows. I really want to build a template for one row, and loop through and populate as many as I need to show up. I was thinking this is a job for Web UI loops (think fruitsearch example). Or do I want to build the template and make it a web component and pass my data to that? I'm really not sure what the best structure is here. This is a bit of an open-ended question, but what's the ideal structure for populating multiple rows of data?
Use Web Components when you need re-usability, or if your rows have complex logic or layout associated with them.
Given your description of "rows of products" I would use a Web Component for each product row and possibly another Web Component to keep track of all the product rows. For instance, if this is a product search result page, the SearchResultComponent could have a title, a list of ProductRowComponents and the number of results found, and each ProductRowComponent could have a name, a price and an image.
This would make it easier to handle the complexity involved as well as allow re-usability (i.e. using multiple ProductRowComponents).

How to keep track of selections in sequential form

I have what is essentially a form, only the fields depend on the previous selections, and the type of form object aren't always typical form objects.
For example, the first choices are simply in the form of links. It could be a list of teachers, where when you select a teachers name, the classes that teacher teaches is then displayed in a drop-down list. Then once a class is selected, the available dates and time are displayed in a calendar. Once a date/time is selected I need to know all of the selections that were made -- the teacher, the class, and the date and time.
How would you recommend keeping track of these selections? I'm using ajax, and although the form fields are hidden at times, i can still access their values. The one exception is the teacher selection. Since it's just a link, I pass the selected value to a method, but then I've lost the selection. I could store the selection in a hidden field, but is that really the best solution?
Thanks!
I would use a session store on a controller action. Then once it's complete extract all the gathered information.

Resources