Orbeon: add section for each row in repeating grid - xpath

I would like to build a form that has some kind of overview at the top, where the user defines a list of items (repeating grid). For each item, there should then be a section further below (repeating section) where the user needs to add additional information to that specific item (it's A LOT of information, that's why I need a whole section per item and can't just add additional fields in my repeating grid).
So the easiest way would be to let the user manually add a section per item, but that's not very user friendly and also I need to make sure that there is exactly 1 section for every item.
I tried using count($my-item), count($my-grid) and count(xxf:repeat-items($my-grid)) as the min and max iteration count of my repeating section, but neither work. Also when I add $my-item as the calculated value of the first text field, always the first item in my grid is taken (should be the i-th, i being current iteration count).
Demo here (should be self-explanatory):
http://demo.orbeon.com/demo/fr/orbeon/builder/edit/92384bdcfd5dfeef2f79e79540e566501e6e5243
How can I achieve this?

Orbeon Forms 2018.2 will have a component to automatically synchronized repeated content. See the documentation for details.

Related

How to move associated data in single row based on shifting/updated one cell (value) within same row in Excel?

We have created a drop down list for our managers to select from a list of techs in section 1 on sheet A. Once they select the tech in one cell, it automatically fills in section 2 on sheet A. If the tech is listed more than once, we have added a formula that will search the original list in section 1 and only list the tech once in the section 2. The manager goes to section 2 where the techs are listed only once to add additional information, for instance, check in and check out dates. If the manager or anyone goes back to the section 1 where this was entered and deletes, changes, etc., pretty much makes any adjustments to that list - it will adjust the order of text in section 2. We are fine with this but would like the data that was now entered in that row (if any) within section 2 to move with the first cell. Can anyone help with this?
Help resolve the above question.

Position a form on a form in vb6

I need to open a second form and position it in a particular location on the first form opened.
Explain: I added a panel to the original form and as I was putting controls on it, I got a message that I could not add any more controls. So...
There is an existing panel that I need to cover up with a second form and have it remain covered even if the original form is dragged about the screen. The second form will cover it, but I need to know how to position it in reference to the first form.
The only references I can find are how to position it on the screen, not another form.
There's certainly no easy way to do that (a form can't host another form). The limit you encountered was the max number of named controls you can have on a form (254, see https://msdn.microsoft.com/en-us/library/aa240865(v=VS.60).aspx).
However, a control array only counts once to that limit. So instead of adding a new control (for instance text boxes) for every input field, add them as new elements of a text box array. The difference in code is that you'll reference the text boxes by index instead of unique name (you can use constants as index parameters to identify the different input fields, such as name, address, etc).

Suppress Duplicate Rows only in the Same Page

I am using Suppress Duplicate function to prevent the same item code to be displayed more than once.
I have just one question:
Is it possible to hide the duplicates only in the same page?
For example, Item Code "1111" is displayed in Page-1, no duplication is shown under it. But in case "1111" has a long list in other columns and continues to Page-2, is it possible to display the item code in the first row of Page-2 and then suppressed again? So if it has an even longer list and extends to Page-3, the item code can be displayed again in the top row?
You could add a group by on the item code and place the information about in the group header. That way there are no duplicates, but you have the option to repeat the header with information on each new page.
Thank you for the comment.
It is already grouped by the item code. But I cannot use the table header to display the code because one item code is not always repeated. So one page might have 2 item codes only, but the next page might have 50 different codes. In the latter case, using the table header can be tricky(probably need to iterate the table for 50 times?). Also it is tricky because my report layout has to be consistent with the excel layout sample prepared by my client.
Thank you for your input anyway.

How to design this page in razor world

In MVC-3/Razor, I need to create a page which will have five set of controls. Each set will have a drop-down and a text box. User will select an option from drop-down and then provide some feedback on text box.
When the view is shown very first time, I only have to enable controls in first set. Whereas all controls in 4 other sets should be disabled. Once user perform action in first set of controls (select optino from drop-down and enter in text box), the second set should become enable now, whereas other set of controls should still be disbaled. The data shown in this second drop-down is dependent upon what user has selected in first drop-down. Once user complete action in this second set, the data in third drop-down will depend upon whatever user selected in first and second drop-down etc.
I am a web-form aspx developer and not sure what will be the best way of designing this in MVC-razor world (because there is not view state etc).
Step 1)
What needs to be clarified is what will cause the other “sets” to be enabled?
Is it after the user has selected an item in the dropdown
OR
Is it after they have entered some text in the textbox?
What also needs to be clarified is if you have a dropdown AND a textbox are they both enabled at the same time or is the textbox only enabled after you’ve selected an item in the dropdown?
Once you’ve got that figured out, move on to the next step.
Step 2)
Do the users need to visually see the 4 sets from the beginning (disabling the 3 other sets) or can you simply show the other sets (on the fly) once the previous one has been successfully filled?
Depending on the answers, this may vary your approach.
As for me, the way I’d do it is simply have/show one set that loads at the beginning.
Once the user has selected an item from the dropdown, I would make an AJAX call passing along the selected item and get back a list of values for the second dropdown.
Then, using jQuery, I would duplicate the row (or div) of the first set all while changing the values in the second dropdown box.
Repeat process for when an item is selected in the second dropdown.
But wait! There’s more!!!
Let’s assume you’ve reached the third set. What if the user decides to change the value in the first dropdown? What are your requirements if that happens? Should you remove all other sets and start back at square one? I guess so…
Since we are not aware of the full set of specs for your tasks, we can only assume stuff and this may (or not) be the best path to take.
Duplicating a row (or a div) using jQuery is quite fun and performance wise, it’s nice.
Keep in mind, you will have to give a different ID to your controls (dropdown + textbox) so when you submit the form, you could use the FormCollection to get those dynamically generated controls.

InfoPath 2007 - Populate drop-down list on-the-fly

I'm working on an InfoPath 2007 form. I have two drop-down lists and i need the second to be populated with items bases on the value chosen in the first list. I use c# to populate the drop-dpwn lists from external sources. I've tried to use the OnChange event to make all this, but the second list is still empty.
If anyone knows, please tell me.
You can filter the entries for the second drop-down list based on your first list (but only if the entries are based on a data source, not manually entered).
Bring up the properties window for
your second drop-down list.
Select your data source.
Click on the button to the right of the Entries text box.
Select the repeating node you wish to use for the basis of your list entry.
Click the Filter Data button. From here you can enter a filter to limit the entries displayed based on the value of your first drop-down list.
Your question was a bit ambiguous. You may be trying to populate a secondary data source based off of your first drop-down list. This should work fine with an OnChange event. Can you post the code you are using to do this?
Some additional tips that may help:
The change event will not fire until focus moves off of the list box. So, for the second drop down to populate, you will need to set the first drop-down then hit tab or click elsewhere in the form.
I don't know the size or nature of the data source you are using for the second drop-down list, but you may consider downloading the entire data source and filter it using the method I described above. This may be a better solution as you won't need to make a database query between entering the first list box and the second one.

Resources