copying data from Parent Repeating Section to Child Repeating section in infopath - formula

I am having an issue with the repeating section. The scenario is i am having a text box inside a repeating section and a checkbox outside a repeating scetion. I want the value of the textbox to be copied when the repeating section is repeated. This has to be done when i click teh checkbox which is outside the repeating section. I used Xpath formula for this. it works fine if i just repeat the section but not when i click the checkbox which is outside the repeating section.
The formula is as follows
../preceding-sibling::my:RepeatingSection[
count(../preceding-sibling::my:RepeatingSection)
= count(current()/../preceding-sibling::my:RepeatingSection)
- last()
]/my:TextBox
This formula works fine for a single repeating section. But i also have another problem if there are nested sections. for example if i have a repeating section and another repeating section inside it and the textbox inside the nested section. The problem is writing the correct path to navigate within the sections.
Can anyone please help me with this issue
Thanx in advance :)

Related

InfoPath - Delete specific repeating section

I have recently been tasked of extending the add/remove functions for repeating sections within an InfoPath form. Primarily because the default look is pretty ugly and unintuitive.
What I want to do is to place a "remove" button within each of the repeating sections, which when clicked will remove that section. This seemingly simple task does not appear to be all that simple in InfoPath.
Does anyone know how I would go about such a thing?
Removing the whole repeating section? or line in that section?
For the whole repeating section, try hiding rule it by putting it inside another section.
There is no out of the box rule that will delete the section.
You could use code for this - write code that deletes the instance of the group when the button is clicked.
You could also leverage Mekalikot's suggestion - add a field called "hide" or something in your repeating group and when the user clicks "Remove" set "hide" to true. Add conditional formatting to hide the repeating section if "hide" = true.

Auto Complete Extender for multiline textbox - Facebook style

I have in my application a larger textbox and offer user the possibility to enter text on several rows like this:
first piece of text
second piece of text
and so on...
Each row is a distinct piece of data that has a significance. The thing is I would like to use ajax auto complete extender functionality after the user types a certain character on a row, such as #, and filter the records in the database according to the first letter the user typed after #, moment when the auto complete suggestion list would appear. For example, third piece of text #Action1, means that after the user typed A he would be prompted with a list of values to choose from.
There are several items of concern for me: first, it is possible to use autocomplete extender only for part of the text in the textbox, and second does it work like this for multiple rows (i.e. one time - in each line behaviour)? Regarding its position, I guess I have no other choice than at the bottom of the textbox it refers to, despite I would have liked it to appear below the # symbol.
Thank you very much.
Update: I found something similar to what I am looking for here: Twitter-style autocomplete in textarea, but the author only explained briefly his solution. Any help much appreciated, thx!
Each row is a distinct piece of data that has a significance.
Why are you using a textarea then, and not multiple <input> fields?
Sounds to me like your error in UI design lies right there already, so the rest of my answer is rather theoretical; I probably won’t go into more details as the sensible fix for your problem is the one above.
first, it is possible to use autocomplete extender only for part of the text in the textbox,
Why shouldn’t it be? Cursor position in a textarea for example is readable (although it requires some working around cross-browser issues).
and second does it work like this for multiple rows (i.e. one time - in each line behaviour)?
So long as the line breaks are “hard” ones (made by the user themselves, using enter/return), splitting the actual textarea content by "\n" to have each row as a single value is no problem.
Regarding its position, I guess I have no other choice than at the bottom of the textbox it refers to, despite I would have liked it to appear below the # symbol.
You could try to roughly measure the #’s position, by line and col number it is on, and match that to the character width and line height, when using a monospace font. For other fonts, some more “magic” might be required to measure the actual width of the previous text before the # character.
I have created a Meteor package for this, which allows both free text and multiple autocomplete sources. Meteor's data model allows for fast multi-rule searching with custom rendered lists. If you're not using Meteor for your web app, (I believe) you unfortunately won't find anything this awesome for autocompletion.
https://github.com/mizzao/meteor-autocomplete
See the link for pictures of how it works. Fork, pull, and improve!

ASP.NET VB Nested Listviews appearing side by side

I currently have a parent Listview and its child Listview displaying in the centre column of an HTML page that consists of three columns left, centre and right. And all looks very good.
However I would like to display the child list view in the right column beside the parent list view.
To do this it seems I must somehow generate from the code behind page a new row in the table every time the parent Listview displays a record of its data and then some column HTML so the first child list view will appear in the right hand column.
If anyone can guide if this is the best approach and how to do it, it would be much appreciated.
I'm rather surprised that you haven't gotten a response to this question in the month and some change that it's been since you posted it.
My suggestion would be to use an updatepanel (Ajax) and do just what you thought you should: When an item is selected in the parent listview, dynamically load the second listview.
Just a suggestion.

How can I display image and text within one AS3 datagrid?

The following page shows how to load external images in AS3 DataGrid: http://www.adobe.com/devnet/flash/quickstart/datagrid_pt3/ (image and text are displayed in two columns)
But I wonder how the image and text can be loaded together within the same DataGrid. Within one column: Image followed by the text.
I cannot get it work so I'd be grateful for any help with examples. Thanks
You just have to write a custom CellRenderer that does it. If you really read and understand that page you linked, they explain how to make custom CellRenderers, and you can put whatever you want in a cell. An image with text, a button, a game of tetris, whatever.

Dynamically adding controls to a panel - layout question

I've successfully been able to add controls (labels, images, buttons, etc) to a panel control (using VB/ASP). This panel control, I refer to it as "insertpanel". Then I add this panel to the main panel on my webpage which I made during design time. The problem I run into is that when I add multiple controls of any type to the panel, they are all added in line with each other. I tried giving my image some css-styling of:
.VBCODEimageinsert
{
float:left;
margin:2px;
}
That works fine as making the image be at the left side of the panel, and the 5 labels to the right of it. Problem is, the labels are all in line and they don't wrap to the next line. I tried adding a literal of the carriage return/line feed but that didn't seem to work either. What is an easy way of laying out this panel that i'm inserting into another panel? A table? And can I do this if a table will work:
mainpanel.Controls.Add(table)
Yes, you can add a table, then rows and cells for the other controls. And as mentioned above, you can use a < br/> instead

Resources