copy data from one column to another - sharepoint-2013

I'm running SharePoint Online 2013. I've set up a document library. The default "Add Document" form contained many fields irrelevant to some users, so I've got a requirement to add another "Add document" form with shorter list of fields to fill in. I've added a new content type with fewer columns. The columns share names with parent content type, Document. Now I would like to do the following:
1. Move data from the original Document content type columns to the new content type columns with identical names
2. Delete old columns
3. Redefine all views to point to new columns.
Question 1: is it possible to do? Can documents in library have some columns from one content type and other columns from another? Can views display data from two content types?
Question 2: If q1 answer is 'yes', how can I move data from the old columns to the new columns? I tried to follow suggestion here: How to copy values from one column to another and set up workflow in SharePoint Designer, using "Set Field in Current Item" action in Reusable Workflow, but the Field drop-down box only lists one filed, Title, to pick from. What am I doing wrong?
If q1 answer is 'no', what can be done to resolve this?
Thank you.

Answer 1 : No, a document is bind to a content type. Yes, a view can display columns from different content types.
In your scenario, I would create the new content type then :
Copy the initial document
Bind this new document to the new content type.
Get the columns data of the old document and set this data to the columns of the new document.
Delete the old document
After you make sure your old content type isn't use anymore. You should be able to delete him.
(Make sure you clean all the recycle bin before delete the content type. Otherwise, you'll get an error.)

Related

Make form with dynamical amount of inputs in django template

The crux of the problem is this:
I have a Schema that will later be converted to a .csv file. However, I need to populate this schema with data. To do this, I need columns that will have fields (Name, data type, order, etc.)
But I don't know how many columns the Schema will have
Therefore, the wording sounds like this: Create a form with a dynamic number of columns.
While I was writing the question, I had an idea to create a "Scheme" table in the database and bind a table - "Column" to it
Thus, when you click "add column", a new instance will appear that will already be bound to this Schema.
Am I thinking in the right direction or do you have another idea?
The picture below will allow you to convey the essence of the problem more accurately.
Thank you in advance
If I was in your position, I would utilize HTMX. With that, when the "add column" button would be pressed, a new row would appear.
I would also do it the other way around from what I understand of your post, I would bind the column to the scheme like this
class Scheme(models.Model):
...
# rows of scheme
class Column(models.Model):
scheme = models.ForeignKey(scheme, models.CASCADE)
...
# rows of column

Sales list force change of column in lines

I'm using the page below a POS sales list. Here the user can use the barcode pistol and pass the article and the code is translated into the item no.
The problem is when they use the pistol and end to pick a item and want to pass to next one the line go automatically to the first column (Item type) and my goal was to force to go into the second column (Item no), because the Item type is by default the type "product".
Only change the order of columns of Item no to Item product is not enough in this case.
Since ACTIVATE is not supported for controls in RTC.
Not many good options here.
Try using QuickEntry Property. Set it to false for all controls on subpage except No..
Create custom page with as less fields as possible, use it as buffer to scan all items and create sales lines upon closing of this new page. You can implement desired behavior on this page and keep original page almost unmodified
Create add-in that will intercept scanner output somehow.

Simple document switcher functionality?

I'm writing an application that will allow a user to drag/drop specific files onto the application window, parse those files, put the contents into a table (via a QStandardItemModel), and add each file's name (or alias) to a separate tree view (which acts as the document switcher).
I'll use NotePad++ as a simple example.
When I click any of the new files in the leftmost "Doc Switcher," it shows the contents in the right pane. Imagine that right pane is a table. And for instance, imagine that the list on the left is a list of .csv files that were imported into the application.
What I want to do is, upon clicking each item in the list, I want the corresponding parsed .csv file to show up in the table pane on the right.
My table is just a QTableView that displays the contents of the .csv files in a QStandardItemModel. Everything works when it comes to implementing the table and parsing the files.
I also set up a QTreeWidget as the "document switcher." Now, I need to link the document switcher selection to the table so that each file's respective contents will be shown in the table view.
I can have the application populate the tableView with the model contents when the QTreeView's top level item selection changes. That's no problem. The problem is with what I should be checking for when that selection changes and how.
I'm unsure of how to implement this. How do I store a bunch of QStandardItemModel objects and then link them to their names in the document switcher? Should I even be doing that? Do I have to create a new QStandardItemModel for each file that is imported? Should I create one QStandardItemModel, then somehow save it to be pulled back up later and re-use that same table model object for each file that is added? I'm just unsure how how this is supposed to work and feel like I am missing a fundamental part of all of this.
I would suggest two approaches to solve your problem:
You can watch document switcher signal (selection changed) and create new model for the currently selected data. Your table view in the right should show the data, when you set the model. When new file item selected, delete existing model and create new one with new data,
The same as first approach, but instead of recreating model for each data change you can use a single model, but reset its data each time you switch the file.

SP 2013 - Quick edit with Managed Meta Data columns, copy and paste from excel

I'm trying to migrate a meta data from an excel spreadsheet to a SP 2013 document library. The columns are managed meta data columns with pre defined terms matching the data in the excel spreadsheet.
However I cannot copy and paste data from excel via Quick Edit in the doucment library without getting the following error "The data returned from the tagging UI was not formatted correctly"
This happens even when I remove all formatting or paste to notepad first.
Are there any simple solutions to this issue?
http://i.imgur.com/1bqpMPA.jpg
Thanks,
Any metadata fields are in fact foreign keys, as it were, to a dynamic, hidden table (or 'list', whatever you want to call it) within SharePoint. To paste a value into a metadata column, you need to know your element's guid (as in, within the term set) and then append that to each metadata element you're pasting in as a <name>|<guid> pair.
Getting the GUID for an element within your term set
Browse to [site-root]/TaxonomyHiddenList/AllItems.aspx and create a new view (or edit the default one) to display the field 'IdForTerm'.
Where you have a term 'apple', your IdForTerm may look like '1288beaf-82e0-4d81-b9de-ad5ad8382938'. Take a note of the guid for each term which appears within your input data.
Edit your input to correctly reference each term
Let's say you're importing your data from an Excel spreadsheet. Or from a CSV. It doesn't really matter. What you need to do is, basically, a find and replace down each managed metadata column, replacing 'term' with 'term|guid'. So our example from earlier, with the apple, would become 'apple|1288beaf-82e0-4d81-b9de-ad5ad8382938'.
Finally, assuming your view is set up in exactly the same order as your input data, you should be able to 'edit list' from within the browser, hit the leftmost side of your first input row (to select the entire row) and CTRL+V all of your data at the same time.
Note there appears to be a limit to the number of entries you can make at the same time. It appears to sit at around 5,000 elements.
Adding on to #rmacd's answer, you can also get the GUID for a given MMS term by first manually entering the value(s) you need in a Quick Edit cell, then copy and paste the same value(s) from SharePoint to Excel. The pasted value will appear with the full term|guid that you need to complete the bulk copy/paste.

Making an Oracle Apex report table element read-only

Greetings:
Is there anyway to make an apex report table cell (or even the entire report itself) conditionally read-only in Apex 3.2? I don't see the "read-only" box anywhere in the options; tried searching everywhere.
Thanks in advance!
Since the whole tabform is to be made read-only for particular users, you can do this at rendering time rather than using Javascript. However, you would need 2 copies of each column:
Column to be displayed for an authorised user, not readonly
Identical column to be displayed for a non-authorised user, with Element Attributes set to readonly=readonly
Authorisation schemes can be used to control which columns are displayed to the user.
I was hoping to find a way to do this with a single column and a dynamic value for Element Attributes, but I couldn't get it to work.
OK, I had an error in concept. I wanted to make a tabular form read-only. That's why I couldn't see the "read-only" box. If you open the source for the generated page, each column has given an id with the following naming convention:
id="f02_0001"
This table cell is in column 2, row 1. So, you can use JavaScript to loop through a column and modify it's properties. In this example, I use jQuery:
var payments = $("[id^='f08_']"); // get all cells for column 8
// loop through items
$.each(payments, function(){
alert($('#'+this.id).val());
// make whatever changes you want to this.id, such as make read-only
});