I have a list with some lookup fields. On their list templates, I followed below steps:
Rename the original .STP to .CAB
Extract its manifest.xml to a local folder (lets call it {workingfolder})
Search for the ProductVersion element. This should have a value of 3
Change its value to 4
Repackage the manifest.xml into a .CAB. I've done this by using makecab.exe in the C:\Windows\System32 folder
Syntax: makecab.exe {workingfolder}\manifest.xml {workingfolder}{template-name}.cab
Change the generated cabinet's extension from .CAB back to .STP and upload it into the _catalogs/lt
I uploaded List Template using elements.xml. But I can't even access List Template using code (given below).
SPListTemplate listTemplate=null;
foreach (SPListTemplate template in SPContext.Current.Web.ListTemplates)
{
if (template.Name.Equals(templateName))
{
listTemplate = template;
}
}
return listTemplate;
I uploaded the same List Template manually with another name and debugged the code. It returns only the List Template which uploaded manually. I know this is a duplicated question, but no solution is working for me.
Related
I am trying to create a dependency pipeline for files before executing my model refresh (web activity) I want to make sure all the related files are there in their respective folders and all files are latest.
Suppose, my model refreshes uses the following file present in adls-
myadls/raw/master/file1.csv
myadls/raw/dim/file2.csv
myadls/raw/dim/file3.csv
myadls/raw/reporting/file4.csv
We need to compare the files last modified with today's date. If both are equal then files are the latest. If any of the files is not the latest then I need an email with the file name that is not the latest and I shouldn't trigger my web activity which usually does model refresh.
I have created this pipeline using get metadata, for each activity, If-condition, web activity, and Set variable activity. But the problem is I am not able to get an email for the file which is not the latest.
How I can get an email for a file which is not the latest file according to my scenario?
Note, the above folders can have more than 100 files, but I am only looking for specific files I am using in my model.
We use SendGrid API to send emails at my company.
You can easily pass the FileNames in the body of the email using any email API out there. You can write the FileNames to a variable then reference the variable in the body. It sounds like you have built almost everything out, so within your ForEach, just have an Append to Variable step that writes a new value to your array variable. Then you can use those array values in your SendEmail Web Activity, or use a string conversion function, there are many ways to do it.
I will update this post with example later
As per your current arch ,you can create variables per foreach activity that would store the file name .
So within foreach activity, in case if the file is not latest using append variable activity
you can save all file names.
and then in the final validation, you can concat all for each loop variables to have the final list of files that are not modified.
But ideally I would suggest the below approach :
Have the list of files created as a lookup activity output.
Provide that to a single foreach activity in sequential execution.
within foreach via IF activity and getmeta data activity, check whether the file is latest or not.
If not via append variable activity append the file name.
Once out of foreach, via If condition check whether the file name variable is blank or has some values.
If it has values, then you can send an email and the filename variable has all the non updated file names
I am currently having a requirement where I need to extract values from a CSV file onto a template within Kofax TotalAgility designer and generate a PDF from it accordingly.
The process would pick CSV files from shared folder on the network as an input and fill a template which is in word format with merge fields with corresponding values and generate a PDF from the populated word document as an output to another shared folder.
Any help is much appreciated.
Reading CSV
There is not anything built into KTA that will handle the CSV file. I would recommend you handle this in C# (preferably your own dll rather than a script activity). The specifics of how you store the CSV data you read will probably depend a lot on how exactly your template is organized and the specifics around your data. But ultimately you will want data in separate KTA variables to map into your merge fields.
Document Creation (Word Document from Word Template)
The primary KTA functionality relevant to your goal is the Document Creation activity (under "Other" when choosing activity type). You will want to read the help topics for a full understanding of the options, but it will allow you to map variables into merge fields from a Word Template (dotx).
The configuration interface of the activity does not make this immediately apparent, but the Document Save Location can be a document variable instead of a path. Once you provide a document variable, the interface will expand to also allow you to choose a folder variable to which the document will be added. Then you can map your data from variables into the merge fields.
Create and Export PDF
Note that using a document variable for the Document Save Location, rather than a file path, is essential because PDF generator works on Document/Folders within KTA, not file paths.
After your Document Creation activity, you can add an Image Processing activity (to convert the merged Word document to tif), and then a PDF Generator activity to create your PDF. Use an Export activity to export the PDF to the location of your choosing.
I think PDF Generator requires tif pages be created first, but you could try sending the Word document without the IP activity if you
want to confirm.
We have created a workflow on a List that creates a new document in a specific document library based on a template file. We would like to add automation so that a user could choose the template file that they would like to use when "running" the workflow.
We have searched around and found many tutorials on document creation, but none where you selected the template you wanted to use.
Any help?
You can do that with Content type. You can link a template to a content type. So Create X content type on your list (X = number of your template file) and link template file to content type.
to sum up :
Enable content type on your document Lib
Create a Content type on your list
Upload and Link template file to your content type
When create new document, choose your content type to change the template file
I have document library called 'Documents'. In there I have this folder structure 'Public' > 'Documents' > 'Legal'. To display the content i.e. Files and folders I can use a web-part.
But My problem is I only want to display the content of this 'Legal' folders document only not the whole document library documents.
How am I suppose to solve this matter?
Chiranthaka
I just add a field and stop it is been viewed. I put a value in that field and filter the view according to that value.
Is it possible to access the list items in the (hidden) "Forms" subfolder of a document library using the Lists.GetListItems web service method? I need to set the content type of uploaded document templates using Lists.UpdateListItems, otherwise, document created from these templates will have the 'Document' content type and not the content type the template had been assigned to.
Lists.UpdateListItems works in subfolders of the "Forms"' folder, but I need the ows_UniqueId of the list item that represents the uploaded file, and I can only get it using List.GetListItems.
Is there maybe another method of uploading files to SharePoint document libraries, in which you can set the content type?
List.GetListItems expects you to pass it a view, if you don't it uses the defaults view. So what you need to do is create a seperate view which lists all items, and make this view list flat (not listing by subfolder).
Then query against this view.
Does this suck? Yes. Does SharePoint suck? I'll let you answer that question. I didn't write sharepoint, just telling you the way it is.
I don't understand the relationship between the content type of an uploaded document in a document library and the elements in the Forms subfolder.
What I'd try:
- Use Copy Web Service, method CopyIntoItems to upload the file, setting some properties, including the content type.
- Use Lists.GetListItems, with a CAM query specifying the file name and asking for ows_UniqueID property