Sharepoint 2010 Exclusive columns? - sharepoint

Does anyone know a way to have two columns in a SP2010 list that are exclusive? I need to ensure that there is only a value for ONE column, not both.
Basically I need the following structure:
Category List ->
SubCategory List (with a lookup to Category) ->
Value (with a lookup to SubCategory).
But, if there is no SubCategory, use a lookup to Category. One or the other must be used, not both.

Using either a list Event Receiver (SPItemEventReceiver) or a Custom Workflow should be able to achieve these desired semantics.
I do not believe the model itself can represent such relationships. An alternative might be to have different content types, for which only one of the columns applies (to each).
Happy coding.

Related

SharePoint List tables

I'm working on a project for work, and I'm attempting to move data from a database with multiple references to different tables.
My question is; is it possible to move the data and be able to have a list that references different lists? For example, when I click on an element in the list, can I create another "link" to take me to another list?
I am not sure but if I understand the problem well You would like to create some kind of column in one list which will store reference to item from other list, correct?
If so then You are looking for lookup columns. When adding column to a list You may select lookup column type, after that You need to select which list You would like to 'reference' and which column should be present from the second list in the lookup column from the first list. Please check the reference link
OOB lookup column(similar concept as database foreign key) will be good, while CSR will be helpful for complex scenario also.

Filtering lotus-domino views that have multiple categories and multiple values

I am trying to design a view with multiple categories, and each document can belong to multiple categories at the same time.
For example, File A is in category:
1->a;
2
I can achieve this effect by specifying the columns as categories and access the document through various routes. However, I fail to specify which category the sub-categories belong to. This is what I am getting instead:
1->a;
2->a
The case doesn't seem too big of a difference but basically the view is returning every combination of the categories and the amount of entries can get very large.
I have tried to add the super category in front of the sub-category and try to filter out entries which the categories do not match the prefix of the sub-categories(e.g. 1,a), but I cannot find a way filter them out. Although the multiple values are shown in different entries, when I try to use the variable it extracts all the values.
Is there a way I can filter the entries based on that particular row instead of all the values? Or is there anyway I can achieve the effect through other methods? Thank you in advance.
You need to collapse Categories and subcategories into a single field. The Domino way to do this is to separate category and subcategory by backslash. So your category field would be something like:
"1\a":"2"
That ties the subcategory to the category. Or if you want to be able to find a document by subcategory only:
"1\a":"a":"2"
You then can use a little formula magic to get from the subcategory back to the main category (presuming the subcategories don't duplicate):
AllCategories := "1\a":"a":"2";
foundCategory := "a";
#Trim(#Replace(AllCategories;foundCategory:#Trim(#ReplaceSubstring(allCategories;foundCategory)));
This would return "1\a" (Note: the formula above is written is classic #Formula language, it is left as an exercise to the reader to translate that to the JavaScript formula equivalent)
Hope that helps

SAS - Reducing list of unique names to a smaller list of generic names based on string similarity within the list

I have a list of 18,000 unique entities in SAS. In most cases, individual entities refer back to a broader general entity, but differ in spelling. For example, "BANK OF MADEUPBANK" and "BK OF MADEUPBANK" would exist in the list as unique entities even though they are in fact the same entity. My goal is to group the entities that are actually the same by a generic customer name. For example, the generic name "BANK OF MADEUPBANK" would apply to "BK OF MADEUPBANK", "BANK OF MADEUP", "BK OF MAD UP", etc. This is straightforward to achieve programatically with various string searches for some common, large entities. However, there's no way to apply a string search for obscure entities that I wouldn't even know are in the list without reading through all 18,000. I'm wondering if there is a way to conduct the logical process I used on this made up bank to catch all related instances within the list of 18,000...but without knowing what the ultimate general entity is. Is there a technique that can scroll through the list of names and group them based on similarity?
Thanks!

Union of two sharepoint list in SSRS

I have requirement to union two sharepoint list on basis of common id field for showing report. Please suggest whether union operation is possible.
Not sure if you mean UNION in the SQL sense (appending together) or you mean you want to join the two lists on a common value.
There's no way to append datasets together inside a report, but there is some limited functionality to look up the values from a dataset based on a value in another dataset.
Take a look at these report expression functions:
Lookup
LookupSet

Display column from one Sharepoint list into another list

I have one Sharepoint list that contains training courses and duration (in hours). I have another list where users can enter the training they have and plan to take (using a Lookup column connected to the first list)
Is there a way I can bring over that Hours column to display on the second list? I only have access to the vanilla web parts and SPD, and I am not allowed to add third-party stuff (solutions/web parts) on the SP servers.
I just need that Hours column to appear in the list itself without users needing to click the lookup field (course title)
If you have multiple column field type and you use that as lookup field. You can get two column values in one field. It will show up as two different columns on list but you will need render templates for input forms. Check this out for basic idea
http://msdn.microsoft.com/en-us/magazine/dd727508.aspx#id0450138
Create a field type for course list
Create render template for MCV and extend SPFieldMultiColumnValue
Make that field as Lookup Column
You have to check if you can do second step using SPD only. Also another way to do it is using Multiple column lookup field
HTH

Resources