I am unable to find the solution for merging the cell by LINQ and as well in UiPath.
For your reference I'm attaching the screen shot.
I have this,
I want this,
Just need the solution in LINQ or UiPath.
You need to use groupby method in LinQ.
In your case it will be like this:
(someDT.AsEnumerable.
GroupBy(Function (row) row.Field(Of String)("SN")).
Select(Function (grp) grp.CopyToDataTable)
).ToList
After it you will recieve a list of datatables grouped by SN Field, and you'll be able to work with them as with separated datatables using for each.
Related
I have an infopath form based on a sharepoint list (worktracker).
In that form there is a repeating section which holds data from a secondary source which is the worktracker list again.
I would like to filter that table using the value in a field on the form - this enables me to run a check on duplicate items on the list by using a calculated checking reference.
I have done this by using conditional formatting to hide the non-matching items but that this killing my form as IE throws tantrum as it takes too long.
Does anyone know another way to do this? I am stuck using IE8 - not my choice!
UPDATE:
So since posting the above, I had since tried using a REST connection which doesn't work as my list is too big. I have also tried using an XML connection to a filtered view and that didn't work either!
Cheers,
In the form, select the value field. Create a rule that sets the secondary data source's query field of the same name to that value. Then query the secondary data source. It will only return the items where the value matches.
In short:
I'm trying to filter an XSLTListViewWebPart based on what is selected in another XSLTListViewWebPart. Using a String field as connection this is working fine. Using a hyperlink field no data is displayed.
In more detail:
I have two lists, say Accounts and Projects. Both have a hyperlink field accountURL.
All accounts have different accountURLs. Different projects can have the same value for accountURL. Both are displayed on a page using the XSLTListViewWebPart.
The simple goal is to filter the Projects list based on which item is selected in the Accounts list using the accountURL field. So I established a web part connection using the acountURL as a filter. Alas, when an item in the Accounts list is selected no items are showwn in the Projects list although I double checked that there are matching values.
When using a string field instead of a hyperlink field for accountURL everything works like a charm. Problem is, I need the hyperlink field.
Is this desired behaviour? Do you have any suggestions for a workaround?
(I already tried converting the hyperlink field to a string field via a calculated column which did not work out either.)
All was and is to be done in the web interface or SP-Designer. Coding a WSP is not an option for this problem. As I'm not quite familiar with the correct terminus technicus I use field and column interchangeably.
All help is greatly appreciated.
Ben
Someone on the Microsoft forum suggested the following workaround which does its job well:
Add a hidden text column to both lists.
Use a workflow which is triggered on item creation and update to copy the value of the hyperlink column to the hidden text column.
Connect both webparts using the hidden column as filter.
Nonetheless, I still wonder whether it is possible to use hyperlink columns or other special columns for filtering. I also had the problem that I cannot use a person column as lookup.
Does anyone know if whether there ist some kind of overview
which column types can be used for filtering/formulas/lookup/...?
Cheers,
Ben
I have a document library where i have columns called Title and Category(is a lookup field) and User.Also,I have a list where i am just storing categories. I would like to join both document library and list so that i can dispaly all categories and the documents associated with it. once i get everything i would like to perform filtering so that it dispalys only selected user's documents.The displaying of the documents is working fine but not filtering. My questions is CAn we perform join between doc library and list? Plesae help me.
Thanks
The content query web part (CQWP)is probably the easiest way to do this without code. Since you only have one field in your lookup (categories) you don't need to do a join as SharePoint stores the lookup value in the Document Library. You will need to edit your CQWP to add this field, there is a good tutorial on doing this here. It also explains how to filter your CQWP.
Finally you will need to clean up your lookup field as SharePoint will store the value like this: 1;#Category1.
The CQWP uses XSLT to display the results so in your case you probably don't want to show 1;#Category1 you probably only want to show Category1. You can use the following XSLT to accomplish this:
<xsl:value-of select="substring-after(#Name_Of_Your_Lookup,'#')"></xsl:value-of>
I am binding an SPGridView to a SPList. As code samples suggest, I am using the following code to create a dataview based on the list.
dim data as DataView = myList.Items.GetDataTable.DefaultView
grid.DataSource = data
etc...
What I am finding is that the column names in the resulting dataview do not always match the source fields defined in the SPList. For example I have columns named
Description
ReportItem
ReportStatus
these show up in the resulting dataview with column names like
ReportType0
ReportStatus1
This leads me to think that I have duplicate field names defined, but that does not seem to be the case.
Seems like I am missing something fundamental here?
Thanks.
The GetDataTable method is returning the internalName (or staticName -- I can't remember for sure which but they are frequently the same) representation of the columns, rather than the Title representation, which is what you see in the Web interface. I believe GetDataTable does a CAML query under the covers, and you have to use that internalName for field references in CAML.
This blog talks about it in a little more detail.
So I posted about this on my blog, but I wrote a little utility method that you can use, right after you get the data table it basically remaps the column names in the DataTable to their friendly names.
DataTable table = list.GetItems(list.DefaultView).GetDataTable();
foreach(DataColumn column in table.Columns)
{
column.ColumnName = list.Fields.GetFieldByInternalName(column.ColumnName).Title;
}
Hope that helps!
What you also could do (if you´re using .NET 3.5) is to use an anonymous type and bind against that. If you´re doing this you might wanna go with a Linq DataSource as well.
I have made a post that explains this here.
I'd like to create a view in Sharepoint that has a filter based on a date field.
The filter should be >= Today and <- Today + 90 days.
I found a reference to the
<Today OffsetDays=”5” />
CAML function and could probably use this by setting the view using the API.
My question is how do i set this using the browser based admin page?
alt text http://www.isuppli.com/Img/Development/CreateViewSample.gif
This can be done OTB using the filter dropdowns when modifying or creating a view:
Filter Image
alt text http://img91.imageshack.us/my.php?image=filterew5.png
Edit: Fixed image
Ok... when you using formula for the column...
It cant using [Today] because it doesnt exsist on the list column...]
So i suggest that you must required the column Today first, so you can use [Today] At the formula..
i think u just dont have using CAML or column formula, but it can do from filtering like AdamBT says...
Hehehe...