Infopath 2010 - Create a repeating block from each item in an array on form load - repeat

Please forgive me if I don't explain this well. I'm new to Infopath. Here goes!
Overall Goal: Create an infopath form that will generate an email, eliminating certain 'human error' problems that we've been having.
Problem: Automatically creating a new repeating block for each item in the list/array.
The list would be something like:
PROPERTY NAME = Prop 1, Prop 2, Prop 3, etc.
Below is the entire block of data that I want to repeat.
*PROPERTY NAME* – OPEN or CLOSED
Hours – XX:XX AM ET – XX:XX PM ET
No incidents open
IMxxxxxx - Incident details | Status: Red
This entire block needs to be repeated for each property we own. Now, while I know that I could create multiple blocks for each property manually, that makes creation and maintenance of the form time consuming . Ideally, I'd like the form to read the property's from a list or array, and insert the name into each new block when the form loads up. The rest of the info would be filled out by the user of the form. This way, if we ever add or change a property, I or someone else can easily update the form by simply adding the new item to the list/array.
I have been Google'ing this for hours today and I think my problem with search results boils down to my lack of knowledge of the proper terminology.
Does anyone have any ideas?

Create a secondary data connection to the source list (where does it live, BTW? SharePoint? SQL?) Drag the data node for the secondary data connection onto the canvas as a repeating section with controls. Remove controls you don't want to see and arrange the others to your liking.
Upon form load query the secondary data source. The repeating section will then be populated with the items returned by the query. This will only read the items, though.
If you want to edit the items, then you need a repeating group in your main data source. After querying the secondary data connection, you need to copy the data from the secondary to the main data source. Edits can be done in the main schema, and you will need a submit data connection to write back the changes.
This is not out of the box InfoPath functionality but it can be done with code or with 3rd party tools like Qdabra Software's qRules.

Related

Access 2007 need to Force a query update based on a field change in a form?

I have an access database with several calculated fields in text boxes on a form. Most of those update immediately after the data included in the calculation is updated. However I have a couple of those calculated field text boxes that include a data point from a Query, when I update a filed that would impact the query results, those calculated fields do not update correctly until I click through a few records or close and open the form.
How can I force that specific query to update after updating a specific filed on the form?
Try refreshing the form.
Me.Refresh
As an aside, you really should get out of the habit of using bound forms, because you have to end up kludging a bunch of stuff (like this) to get it to work properly, and the Undo functionality (cancelling the entry of a new record) is unstable at best. By unbinding a form, you can have more control over how it reacts to calculated fields and dumping a new data entry is a snap.

How to make a MS Acess Report where you have one page per record?

I cannot figure this out for the life of me.
I want a report object where each page (no matter how big, small, etc) corresponds to one record in the underlying source query (each record corresponds to a Client along with some financial data).
I've tried grouping by Client, inserting page breaks, trying to integrate forms, etc. Nothing. Everything just combines together into one giant list -- there's no separation per page.
Select the Group Header and view Properties (F4). It should be named something like GroupHeader0. For the Force New Page attribute, select Before Section, After Section, or Before & After Section.
The hardest part of this for me was finding the correct item to click that has the Force New Page attribute -- it isn't the field itself, but the Section (which is named "GroupHeaderX" by default).

Access Query not updating fast enough

Im building a key inventory mgmt system. I've created a query that show's me keys currently not in use by identifying which keys have been returned, aren't lost or have never been rented. I copied this query into the look up field for key_id in my keyActivity table (used to record key sign outs). The issue is that the query does not update to provide available keys until the table keyActivity is closed and opened again
Example: I open keyActivity, indicate that key_id = 5 is lost. When I go to a new record and select the key to sign out, key_id = 5 is presented as being available. It is not until I close the table, open it again, that key = 5 is removed from the list.
Here you can see key 5 is indicated as lost in id 5 but in id 7 when selecting a key, 5 is available when it shouldn't be.
Is there anyway to fix this or set this up to work as intended. I plan on using forms to present all the information. Is there a form solution perhaps?
The suggestion you would be better off with a Form to change table data. It can be easily requery-ed to update the table according to the changes you make and to display the udpated data accordingly. Please also read on the given references for further info.
In terms of data updating and locks in a multi user environment this article could be helpful.
"Access is NOT a database server. It's a desktop database. It has been pushed to the limit to support mutli-user environments, but only in the sense that you can share the "back end" database across a network."
...
...
"Even the record locking is performed by the Front End. All of the front end
database applications share the "lock file" (a file with the same name as
the database file, but with the extension LDB); but that file is simply a
mechanism that the front ends use to determine which front end can make
changes to the database."
....
Here is a difference between requery and refresh:
Me.Requery forces the entire recordset (underlying data) for the form to reload. This means ALL of the records in your current form will reload. Your current position will be lost, so if you're sitting on record 10 of 100, you'll find yourself back on the first record. Me.Requery is essentially the same as closing and reopening the form. Any new records added by other concurrent users will be available. Likewise any records that have been deleted will disappear. Requery essentially "re-runs the query" that pulled the data into the form in the first place. You can also use requery to update the data in a list box or combo box.
Me.Refresh saves the current record that you're working on. It will also retrieve any changes (but not additions or deletions) to any records shown in the current form. Any calculations on the form (unbound fields) are recalculated. Refresh does NOT reload the recordset. You do not lose your position in the form (you stay on the current record). Any new records added by other users will not be shown.
Reference
MS Access - Write to Table Immediately After Changing Value in Form

InfoPath 2010 NaN

I have been trying to update a text field in a form that will automatically generate a new number in a read only state when a user fills out the form. When the user completes the form and selects the submit button, the form will be attached to SharePoint List and the following user will open the form and the number field will be the number +1. I have used 'count(mynumber)' and the field returns 1, but when I close the form and re-open it, the field still displays 1 and never increases. When I use 'count(mynumber) + 1' the field returns 2 and also never updates. Finally, I used 'max(mynumber) +1' and it returns NaN. I have come to the conclusion that there is an array here, but don't know what I need to do, to fix this.
I have informed my manager of 'InfoPath 2010 Cookbook' so hopefully this will help, but I also took a gander as this following link, which was not easy to follow as I believe its for 2007 instead of 2010.
http://claytoncobb.wordpress.com/2009/06/15/auto-numbering-infopath-forms/
I am using SP 2010.
So, here is the simple approach to the simple request:
•Just like in any database, every item in every list and library in SharePoint has a unique ID. This ID is stored in the ID field, which is available for viewing in any list or library. Go to your list, modify the view, and check the box next to the ID field so you can see what I mean. This ID is 100% guaranteed to be unique and is never duplicated.
•Since you already have purchase order numbers, you can't use the IDs by themselves, however, you can use them to drive your auto-generated Service Order numbers
•The easy method for doing this is to utilize your SO field, which is now a Number field, and determine the differential between the next ID in the list and the next Service Order number that needs to be created.
•Then, create a simple workflow in SharePoint Designer 2010 that ONLY runs on the creation of a new item (only runs once per item/form), and set it to add the differential to the current item's ID (Something like Do Calculation: ID + 1200) . Next, use Set Field in Current Item to set your SO field to the variable created by the Do Calculation step
From then on, you will always have a GUARANTEED unique, auto-incremented SO # for each form, and you should make this field read-only inside the form so that users can only view it and not edit it.
--Clayton Cobb

Auto Inserting data into table row behind subform?

I've got a form that's got a subform and THAT subform/child has a subform/grandchild.
When I add a new client to the main form, the subform/child contains data like shipping address, etc etc. The subform/grandchild that one contains data like what we're shipping them.
When I make my initial new entry in the top form, there's data that seems to auto populate into the subform/child (and subsequently the table), however there are things that are always "default" items to ship (third subform/grandchild) that do not do that.
I've got some table constraints for the grandchild table like (ShipPackingSlip type bit) is set to 1, so that the checkbox should always be true. However, this does not occur on the 3rd layer of the form. Even setting the default option value to -1 will "autocheck" the box, but the data behind the forum does not reflect that.
Am I doing something wrong here?
Does that even make sense?
As I understand it (and I could be wrong), you can't use a subform in a subform on a main form without problems. It's better to organize your data and forms so that if you need to view more detailed information on data presented in a subform - it's better to call a new form from a button on the subform, passing a value to it so it pulls the correct record to view.
This would, of course, require you to store this subform of the subform data in a related table - then just relate it back to the main database with a unique identifier. This allows you a bit better means to organize your data, indexing isn't a pain, and you don't repeat information entry as much.