## 2013 – Unable to reference a column by its Internal name. Column does not exist. It may have been deleted by another user

Today I created a new site column named “Business Category” inside my issue tracking list on SharePoint 2013 server. The column type is a dropdown list. Now the internal name for the column is “Business_x0020_Category”, as shown on the URL where the encoded name is “Business%5Fx0020%5FCategory” :-

Now I try running this command to update the value of this column to all the items inside the list:-

``````\$web = get-spweb "http://****/***/**/"
\$list2 = \$web.lists("Tracking")
foreach (\$i in \$list2.items)
{
\$a = \$i("ID");

\$sourceItem = \$list2.items.GetItemById(\$a);

\$sourceItem.Systemupdate();

}
``````

but I got this error inside the PowerShell command:-

``````Column 'Business_x0020_Category' does not exist. It may have been deleted by
another user.
At line:5 char:1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : OperationStopped: (:) (), ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException
``````

and when I run the following command

``````\$web = Get-SPWeb  \$web = get-spweb "http://****/***/**/"
\$list = \$web.lists("Tracking")
\$list.fields | select InternalName, StaticName | sort StaticName | ft -AutoSize
``````

the column Business_x0020_Category is listed in the list:

``````PS C:Windowssystem32> \$list.fields | select InternalName, StaticName | sort StaticName | ft -AutoSize

InternalName                     StaticName
------------                     ----------
_CopySource                      _CopySource
_HasCopyDestinations             _HasCopyDestinations
_IsCurrentVersion                _IsCurrentVersion
_Level                           _Level
_ModerationStatus                _ModerationStatus
_UIVersion                       _UIVersion
_UIVersionString                 _UIVersionString
AppAuthor                        AppAuthor
AppEditor                        AppEditor
AssignedTo                       AssignedTo
AssignID                         AssignID
Attachments                      Attachments
Author                           Author
BaseName                         BaseName
Category                         Category
Comment                          Comment
``````

so can anyone advise what is going on?

## list manipulation – Replacing a random ith row and column from a matrix

Currently I am trying to delete a randomly-chosen $$i^{th}$$ row and column from a square $$n times n$$ matrix $$A$$. So far I come up with the following code:

``````Drop[A, {RandomInteger[{1, 400}]}, {RandomInteger[{1, 400}]}]
``````

The problem with this command is that the random integer for {i} is not the same as the random integer for {j}.

Is there a way of making them consistent, so that I drop the ith row and corresponding column while maintaining the randomness of selecting $$i$$?

And if the aim was to not delete the row and column entirely but to replace all their elements with, say 0, how would you go about it?

Thank you.

## materialized view – What is the correct way to do a computed column with complex logic with performant sorting and filtering at scale in MS SQL Server?

I have the Quantity indexed on both tables because I obviously wish
to sort and filter on this column, but of course the index doesn’t
help if I want to sort and filter on vwThingAugmented.

Based on your view and the comment on filtering I am going to assume queries like this:

``````SELECT *
FROM  dbo.vwThingAugmented
WHERE Quantity = 5;
``````

Where there is a filter operator late in the execution plan:

One of the things you could try, depending on the size of the tables and the type of filters you do would be to create a view with a `UNION` an `INNER JOIN` and a `NOT EXISTS` instead of a `LEFT JOIN`

``````CREATE VIEW dbo.vwThingAugmented_2
AS SELECT t.ID
, Quantity = t.Quantity + a.Quantity
FROM dbo.Thing t
UNION ALL
SELECT t.ID
, Quantity = t.Quantity
FROM dbo.Thing t
WHERE NOT EXISTS (SELECT * FROM dbo.AdditionGroup a WHERE  t.AdditionGroupID = a.ID);
``````

You do get two accesses to `dbo.Thing` and `dbo.AdditionGroup` in this case, YMMV depending on the type of query you run against the view. You could try running the same query again:

``````SELECT *
FROM dbo.vwThingAugmented_2
WHERE Quantity = 5;
``````

This removes the filter operator but you do have double index access with a concatenate.

And you still have residual predicates on both parts of the query,

Because the nonclustered index is not covering:

``````DROP INDEX IX_Thing_Quantity ON dbo.Thing;
CREATE INDEX IX_Thing_Quantity ON dbo.Thing (Quantity, ID)
``````

Where now the bottom part is improved to use the nonclustered index (without a key lookup) instead of the clustered index :

Lastly, as mentioned by you, you could add an indexed view to the first part of the view. Remember to use `NOEXPAND` for best performance, even in Enterprise edition.

## sharepoint online – The hidden ‘Order’ column in Tasks list not being migrated

So for classic Tasks list, you are able to manual sort and indent items. This sorting is persistent and not personal. List View sorting is set to None.

Performing a migration using SP Migration Tool from SP2013 to SPO, classic task list functionality is still fully available.

• Manual indent of items is migration
• Manual sort order of items is NOT migrated (it defaults to sorting by list ID)

I have found a hidden ‘Order’ column which isn’t visable anywhere other than opening another column settings on the list and changing the URL to &Field=Order

• this Order column is not part of any content type or visible via SPD
• this column is present in the migrated list, but it not populated with data from the source

## sharepoint online – Attachment URL to column

#### Stack Exchange Network

Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

## SharePoint 2019 on premise – Open lookup column item without modal

Does anyone know any JSON formatting which will open a lookup field item directly without opening in a modal first?

## python – Create a boolean column if one of the columns is greater than 0

I have a dataframe:

``````col1 col2 col3 col4 col5
2     3     4   5    2
0     0     3   2    4
0     0     0   0    3
``````

I am trying to create a boolean column of True/False if one of the values in col2 , col3, and col4 is larger than 0.

For example, in second row, 3 and 2 are larger than 0, we have a value returned as True. In third row, all values are smaller than 0, it returns False.

My code is like this, can anyone help me fix it?

``````code = ('col2', 'col3', 'col4')

df('boolean_col') = df.apply(lambda x: True if x in code else False)
df
``````

## sharepoint online – Creating lookup site column with site scripts

I am trying to create some look-up columns in my site (not in the list) with site scripts. I have succesfully been able to create one:

``````{
"verb": "createSiteColumnXml",
"schemaXml": "<Field Type="Lookup" ID="{41a37806-6c69-4ec0-bb83-fdaa69eed277}" DisplayName="Lookup Column" Required="TRUE" Name="IN_LookupColumn" StaticName="IN_LookupColumn" Group="Test group" List="{9901cb58-72e5-4173-aeec-ca47506b1245}" ShowField="IN_ColumnaDeProva" AllowDeletion="TRUE" />"
}
``````

The problem here is that I require having previously the list ID to be able to create it succesfully. I want to create the list itself with site script and then create a site lookup column pointing to that list, so I won’t really have the list ID to “hard code” it to the schemaXml. I’ve tried with the list display name but without success.

Does anyone have any workaround?

Thanks

## computed column – Displaying number before decimal points in oracle

I have a logic where I want to calculate and display numbers based upon some operations. The operations are below

`V_CALPERCENT nvarhcar(100)`, `v_yearMSA1 nvarchar(100)`,

So I want to calculate `V_CALPERCENT` and I have one value for `v_yearMSA1 = 2`

SO here goes my calculation,

``````V_CALPERCENT :=  (v_yearMSA1  * 2.25) / 100
``````

Its returning me as `.05`

where as I want it should also display the number before decimal point. How to get it please help

## calculated column – Remove characters from Text within a list – SharePoint 2016 onprem

I am trying to remove certain characters or only display certain characters within a list.
The source field is called (Issue Status) and created a calculated column with the following:

``````=LEFT((Issue Status),3)
``````

However, this error appears: “The formula contains a syntax error or is not supported. ”
Even when I try this following, still get the same error message!

``````=LEFT((Issue Status),LEN((Issue Status))-3)
``````

Info: the issue status contains 6 characters in total.
However, the length of this may vary depending on other used words.

Whereas using the simple `=LEFT((Issue Statys))` works and shows only the 1st character. I am confused and now sure how to get this resolved.

UPDATE

The source type of the source column is (Choice) but I also tried it with another source column type (Single Line aka. Text). and no luck.