Action: Send an HTTP request to SharePoint Endpoint: _api/web/fields('FIELD_ID') Headers: { "Content-Type": "application/json;odata=verbose", "IF-MATCH": "*", "X-Http-Method": "PATCH" } Body: { '__metadata': { 'type': 'SP.FieldLookup' }, 'Group': 'YOUR GROUP NAME' }
Etiqueta: field
Power Automate Flow Error: The ‘inputs.parameters’ of workflow operation of type ‘OpenApiConnection’ is not valid. The API operation does not allow writing a value for parameter ‘item/YOUR_COLUMN_NAME[0]/Id’. This parameter is read only.
Error The 'inputs.parameters' of workflow operation of type 'OpenApiConnection' is not valid. Error details: The API operation does not allow writing a value for parameter 'item/YOUR_COLUMN_NAME[0]/Id'. This parameter is read only. Motivo Este error aparece cuando al intentar hacer un update con valores dinámicos, uno de los campos es multiselect. Si tratamos de incluir el …
SharePoint – Mostrar Descripción de un Campo en el Layout
Podemos mostrar la description Out-of-the-Box de un campo en un layout con dos lineas: Primero, debemos asegurarnos de tener registrado el namespace de WebControls en nuestro Layout: <!--SPM:<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>--> Y segundo, debemos incluir la siguiente linea por cada campo que queramos: <!--MS:<SharePoint:FieldProperty FieldName="FIELD_NAME" PropertyName="Description" runat="server">--><!--ME:</SharePoint:FieldProperty>-->
Añadir Site Column del tipo Lookup Field via PowerShell
Con este script podeis crear columnas del tipo Lookup a una lista en SharePoint: $web = Get-SPWeb "WEB_URL" $list = $web.Lists["LIST_NAME"] $lookupFieldXML = '<Field Type="Lookup" DisplayName="NEW_FIELD" Required="FALSE" EnforceUniqueValues="FALSE" List="{LIST_ID}" ShowField="Title" UnlimitedLengthInDocumentLibrary="FALSE" RelationshipDeleteBehavior="None" SourceID="LOOKUPLIST_ID" StaticName="NEW_FIELD" Name="NEW_FIELD" ShowInDisplayForm="TRUE" ShowInEditForm="TRUE" ShowInNewForm="TRUE" RowOrdinal="0" />' $a = $list.Fields.AddFieldAsXml($lookupFieldXML, $true, [Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView); $list.Update(); $web.Dispose();
Obtener padding en IE con jQuery (Aparece vacío)
La API de jQuery especifica que la obtencion de propiedades CSS puede no funcionar en todos los navegadores si no utilizamos el nombre en detalle que queremos obtener. Es decir, si queremos obtener el padding de un elemento y escribimos: $(myElement).css("padding"); Es probable que en Chrome funcione pero en IE nos devuelva un string vacío. …
Sigue leyendo Obtener padding en IE con jQuery (Aparece vacío)
Eliminar una columna de todas las listas via Power Shell
Puede ocurrir que al crear una Site Column y agregarla a un Content Type, nos hayamos equivocado en algún parámetro (el campo Required, por ejemplo). Hemos decidido borrar la columna y para ello la borramos del Content Type y procedemos a eliminarla de las columnas de sitio. No obstante, si tenemos listas que utilicen ese …
Sigue leyendo Eliminar una columna de todas las listas via Power Shell
Crear y añadir columnas a un Content Type via Power Shell
Nota: Al final de la explicación está el código entero para copy-paste. Nota: Si no lo ejecutamos directamente desde la SharePoint Management Shell debemos añadir su SnapIn: Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue 1. Declaramos el sitio web y el content type al que queremos añadir la columna $web = Get-SPWeb "YOUR_URL" $ctype = $web.contenttypes["YOUR_CONTENTTYPE"] 2. Declaramos …
Sigue leyendo Crear y añadir columnas a un Content Type via Power Shell
Error: Field type ‘XXX’ is not installed properly. Go to the list settings page to delete this field
Normalmente suele producirse cuando desplegamos una columna de sitio errónea y la modificamos. Para resolverlo debemos buscar ese campo en la base de datos de contenido y borrarlo. Lo encontramos con: SELECT * FROM [CONTENT_DB].[dbo].[ContentTypes] WHERE Definition Like '%COLUMN_GUID%' Y lo borramos con: DELETE FROM [CONTENT_DB].[dbo].[ContentTypes] WHERE Definition Like '%COLUMN_GUID%' En ambos casos debemos escribir el …
CAML Query Auto-Created in C# with Loops
This is a function in order to create a CAML Query specified for Filters. Once we have the filters, we've to create the parameters for the function, following this template: Parameters Template Name1|Type1|Operation1|Value1,Name2|Type2|Operation2|Value2... [Operation property can only be "Equal" or "Contains", 'cause that's what I need, but it can be modified] Example Title|Text|Contains|Document,Category|Choice|Equal|Docs [Filter items …