infopath: create a multiple selection tree manually - infopath2010

I was hoping that you could answer a query I have with Microsoft INFOPATH.
How could I design a multiple selection list , where each entry has subsequent multiple options and each one among those multiple options further leads to some more.
To put it in a more simple manner, it will have the features of a tree structure.
Also the selected entries (parent along with their child and their child shall be concatenated in a numbered list).I will also like to add that there are no interaction with database or sharepoint lists- I want to have the data manually fed.
Example - Suppose there are 10 countries in a list. On selection of any one, all the states/districts on it populates. Further on selection of any state,the cities inside it populates. At the end those are all listed in a numbered list somewhere.
Could this be done?

There are several ways this could be accomplished, I don't know the scope of what you need to do, but you could do it with conditional rules.
ddl "Country" (France, U.K., Germany, Italy, Spain)
You would have an additional ddl for each possible choice for country that is hidden through a rule, have it hidden unless it matches the value of "Country". So say you want to show cities in France, if the Country of France is selected you would have an additional rule on it that looks something like this...
if "Country" does not equal "France" hide+disable this control.
ddl "FranceCities" (Paris, Marseille, Lyon, Toulouse)
ddl "UKCities" (London, Bath, Birmingham, Lichfield)
Additionally it would be important to do testing and find out how it behaves if you select a street for "France" but realize you meant to select "Germany".
Hope that helps!
(Once again, I don't know the scope of what you need to do, so the best method for you could be something different.)

Related

How to create a view using a count of certain field

I am trying to create a categorized view of all Notes documents that have a field with exact same value, i.e. there is a field for Contractor Name and I want to create a view that lists each Contractor and the documents that relevant to each. How do I do this? I have tried view formulas like the following but no success as yet
SELECT #IsAvailable(Contractorid) & #Count(Contractorid) > 1
SELECT #Count(#IsAvailable(Contractorid)) >1
Nsf databases are no relational databases. The count of different documents with a unique value in a specific field cannot be used to build a view selection formula.
You could write an agent, that runs through all documents and counts them and puts all with count > 1 in a folder, but this is quite a lot of LotusScript code and needs some advanced knowledge.
The other possibilit would be to categorize the view by ContractorId and add one column before that categorized column: simply use 1 as column formula and select "display totals" in the column properties as well as "hide details".
Then at least you have the information, how much documents are in each category, but unfortunately you cannot filter by it and you cannot sort by this column.
A third possibility would be to use an xpage interface, but that is even more work to do and a completely different story developmentwise.
This is similar to view to identify duplicates. My approach is to use folder.
Make a new folder with design of your view. Instead of (not working) selection formula use short LS code as an action, or QueryOpen event (make sure only one user runs the script).
The code should cooperate with another (hidden) view sorted by Contractorid. Make a ViewNavigator for that view and traverse through it with simple logic - if previous entry has the same Contractorid as the current one, put both documents into folder**. That way you will get list of all documents with duplicate Contractorid. Make sure to wipe all the current content from the folder at the start.
** This can be optimized further by slightly more complicated algorithm to handle first duplicate diferently - for more than two duplicates this algorithm makes extra calls of PutInFolder method.

How to bring some difinite items (symbols) based on the chosen item

I am wondering if it is possible when I choose some item from let's say drop down menu in one place , on some other place to appear just some definite items that are preliminary identified to be related to this item. As an example, if you have a company structure- See below the picture- Subsidiary 1( Sub1) has just one Subsidiary with a code Sub1Sub1, so I will be expecting under the required place to appear (which might be in different worksheet ) just Su1Sub1, if I choose Sub2 from the main menu, I will be expecting in this place to get Sub1Sub2 and Sub2 (two different rows) , etc. Initially I was thinking to do this with multiple vlookup formula with syntaxis (iferror(index(.....),small(..)), but in this case we don't have values to bring, we have a combination of symbols (Sub1sub2) etc.. It can be done with multiple if(if(if( etc, but imagine we have many companies so it would be difficult with if(if)s..Please advise.
Use a list box element to select from your master entities.
Use the Change event of this list box to preload a second listbox for the child entities via VBA
The same can be done with the data validation items if you prefer in cell dropdowns. Then you use the worksheet_change event and check if the cell containing the master entity has changed, and if so you reload the correct set of child entities into the data validation list of the child selection field.

Create Excel Contact database

I would like to create a database based on the following reasoning:
I want to assign to each contact I have some tags for his abilities, for example, so there will be a column called "abilities". So I was thinking about creating a list of possible abilities (probably on a second sheet), lets say "play football", "cook", "ride a bike" and define that "Mike" can "play football.
For this to be useful I would also like to know how it is possible to be able to filter my contacts by ticking on the list of abilities I am looking for.
There are a couple of ways to tackle this.
1) Make a table that has contacts and abilities all together. This means that you will repeat the contact info if a person has multiple abilities. Each row will be the unique combination of contact + ability. If you want to limit the options for ability to specific choices, create your list of abilities and use data validation to create a drop-down list of these values in your abilities column.
2) Make 3 tables: 1-Contact, 2-Abilities, 3-Map of Contacts to Abilities (each row contains the unique identifier for a contact and the unique identifier for an ability). I'm not sure if you really intend to make a database or just something in Excel that works. If you can use PowerPivot, that would be a good solution without needing another application to create your db. Bring your 3 tables into PowerPivot. Create a relationship between table 3 and table 1. Create a relationship between table 3 and table 2.

SharePoint Advanced List Relations

Ok - so here's the preface. I realize that SharePoint isn't really the best solution for this, and if I have to use SharePoint, then coding this would be preferable. However, my wings are clipped due to IT policy, and they have no time to do this "for me".
I am developing a document control system for an Environmental Management System. The basic concept is that there is a list of 'General Responsibilities', which identifies a regulatory agency, some category info, links to laws, etc... There's a second list 'EMS Responsibilities', which basically just links (via a lookup) a particular site to a general responsibility, to identify which sites have which responsibilities. We have many sites, and most have most responsibilities so it doesn't make sense to combine the two lists and repeat all this stuff 10x. Finally, I have a document library (for simplicty sake I am ignoring the draft/published libraries aspect) which contains the actual documents. These documents should reference an EMS Responsibility, which in turn references a General Responsibility. The categorization from 'General Responsibilities' needs to propagate all the way to the document library.
Currently, I use workflow to automatically copy the secondary lookup columns referencing the 'General Responsibility' to a 'Single Line of Text' column in 'EMS Responsibilities' so that it is available to the lookup in 'EMS Documents'. However, despite the values being present in both responsibility lists, the values do not propagate to my final list.
This workflow-based approach is stupid. The lookup columns are stupid. There's no way to get this to work elegantly using out of the box components. I want to believe that the reason this isn't working is because I am missing something... but I have searched for hours and can't find any more effective relational capabilities.
First of all, any theories as to why the values do not end up in the final list despite referencing a single line of text column that is filled?
Second, is there a better overall approach that doesn't rely so much on workflows copying data back and forth, and these pathetic lookup columns?
Thanks in advance!
Given the requirements you gave above together with your answer to my question I believe you won't need a workflow to link all three items together. I have two options for you:
1st Option:
Create a General Responsibility list. This list should contain at least two columns. The ID and Title column.
Create an EMS Responsibilities list. This list should contain at least three columns. The ID, the Title column and a lookup column linked to the General Responsibility list.
Create a Document Library. Add a lookup column linked to EMS Responsibilities.
Since the lookup list you are using is already linked to General Responsibilities then there is no need to have another column solely dedicated to point to General Responsibilities. If however, you need to have specific columns in your document library so that it explicitly has columns for both General Responsibilities and EMS Responsibilities use option 2 below.
Option 2
Create a General Responsibility list. This list should at least contain the ID and Title column.
Create an EMS Responsibility list. This list should at least contain the ID, lookup column linked to General Responsibility and Title columns.
Create a document library. You should add two lookup columns. One pointing to General Responsibility the other to EMS Responsibility.
(now the fun part starts)
Follow the guide to edit both your NewForm and EditForm aspx in this link so that your lookup dropdowns will be a cascading dropdown. This will make sure that items from EMS dropdown will only be populated once you select a value from the General dropdown.
Let me know if you need any more clarifications.

"Not in" view for 1:N relationships

Assume we have an entity A which has a 1:N relationship with entity B. I want to create a view, that shows only records of A which has no entity B. A good example is, I want to view Quotes without Order.
Any solution with any complexity would be appreciated, such as plugin, script, silverlight...!
You would have to tackle it indirectly one way or another:
use a SSRS report and embed that where it would be needed (eg in a dashboard). This would have to use SQL rather than FetchXML, so this could only be a solution for CRM On-Premise, not Online
Use a workflow or plugin on create of record B1, or update of B1's parent lookup to entity A, which updates parent record "A1" with some arbitrary field (eg "date of first Order" or "Is converted to Order"). Now just build a standard advanced find query for new_field contains data, (or = 1 if it is a bit field). Depending on the exact scenario, you might need to actually use an integer count if records of entity B could be routinely deleted, or reparented to a different parent A2, so that you can increment / decrement as appropriate (so a reparent would inc the new one and dec the old).
Edit: Note that in CRM 2013 ("orion"), the FetchXML implementation does support this kind of construction for a view, but the Advanced Find tool (for example) does not provide a UI for it. See the answer to this question for more information:
View Showing Accounts that don't have contact
Use the Advanced Find and Select Quotes, then for the criteria select the Order lookup field
and choose the operator to be Does Not Contain Data. By this way, you'll get all records for entity B which have no parents of entity A.
Download the FetchXML and use it in your Plugin or Silverlight.
Edit:
I think the best way is to create an N:N relation with manually created intersect table.
And your query has to select target the intersect table.
As you might know, the intersect table links to both Entities A and B.
The criteria will be: selecting Intersect table where there is no reference to Entity B.

Resources