Custom form – Hide a selection value based on the current selection value in the same field in Sharepoint 2013

I am using Sharepoint 2013. On the form I have a field called "Status" with several choices. e.g. "Step 1", "Step 2", "Step 3", "Step 4", "Step 5", "Step 6", "Closed" etc. I have more than 10 options.

When opening an edit form based on the current state, I would like to display only a selection in this field, not all selections.

For example:
If the current status is & # 39; Step 1 & # 39; is, just show & # 39; step 1 & # 39 ;, & # 39; step 2 & # 39 ;, & # 39; step 4 & # 39 ;, & # 39; closed & # 39; on the field.

If the current status is "Step 4", only display "Step 4", "Step 6", and "Step 7".

Prefer Javascript / JQuery / CSS …

Thank you in advance!
JJ

csom – Authentication at Sharepoint Online stops working

I have a C # app with CSOM (latest version v16.1.19223.1200) and it worked fine until around mid-August 2019. I checked if the current password is still valid.

Code:

using (var context = new ClientContext(SharepointFolder))
{
    // Can't use current user, tried workaround linked from https://sharepoint.stackexchange.com/questions/176375/use-current-users-credentials-for-sharepoint-online-c

    var creds = System.IO.File.ReadAllLines(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "creds.txt"));
    string userUpn = creds(0);
    // var spassword = new System.Net.NetworkCredential(userUpn, creds(1)).SecurePassword; // tried this as well
    var spassword = new SecureString();
    foreach (char c in creds(1)) { spassword.AppendChar(c); }
    context.Credentials = new SharePointOnlineCredentials(userUpn, spassword);

    Utils.Log.Info($"Getting page list from {context.Url}");

    var pagesList = context.Web.Lists.GetByTitle("Pages");
    context.Load(pagesList);
    context.ExecuteQuery();  ///// throws: Microsoft.SharePoint.Client.IdcrlException  HResult=0x80048821  Message=The sign-in name or password does not match one in the Microsoft account system.

    // ...
}

I have traced this with Fiddler and basically:

#   Result  Protocol Host                       URL
2   401     HTTPS   microsoft.sharepoint.com    /   <<<<<<<<<< Why not the path I provided in SharepointFolder?
3   502     HTTP    msoid.microsoft.com         /FPUrl.xml  
5   200     HTTPS   login.microsoftonline.com   /GetUserRealm.srf
7   200     HTTPS   msft.sts.microsoft.com      /adfs/services/trust/2005/usernamemixed
8   200     HTTPS   login.microsoftonline.com   /rst2.srf

Tracking Fiddler with browser access to the same address gives me first access SharepointFolder, is redirected for authentication and works fine.

sharepoint enterprise – Site There was no connection when reading the PDF document in Embed. Tag another website with one day

I am using SharePoint 2013 and I am having the problem of displaying the PDF document in the embedded tag.

Error displayed:

  1. Connection to SharePoint site in embedding rejected.

  2. The display of & # 39; http: //SITE/HR/EmployeeDoc/Passport.pdf&#39; in a frame was rejected because multiple 'X-Frame Options' headers were set with conflicting values ​​('SAMEORIGIN, Allow-From'). Falling back to deny. IN console log.

Note :

It has been working perfectly for 3 years continuously and I receive this error only from 3 days,

I have changed nothing in the process within the past 5 months, within the SharePoint Master Page OR permission.

Only PDF document is not displayed, images are displayed correctly. and if I access the PDF URL directly in the address bar, there is no problem whatsoever.

Can a buddy suggest me why he refuses, and please state the solution.

Please help me to solve this problem.

Thank you very much.

Rest create API sharepoint list item

See the updated sample code as follows:

If you have a single selection for the User and Group field and for the Selection field, create the data as shown below

function createEmployeeDetailsListItem(excelRow) {
var data = {
    __metadata: {
        type: "SP.Data.E2EVMVulnerabilitiesMappingMasterListItem"
    },
    Title: excelRow("Title"),
    ID: excelRow("ID"),
    DateCol: new Date(excelRow("Datecolumn")).toISOString(), //Datecolumn
    PersonGroupColId: excelRow("Persongroupcolumn"), //here you need to set the Id of the Group or a User (For single user or group selection)
    ChoiceCol: excelRow("Choicecolumn") //Choicecolumn, here you need to set you Choice as a Stirng "Choice 1" (Only work for single Choice selection)
}

$.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('Test')/items",
    type: "POST",
    data: JSON.stringify(data),
    headers: {
        "Accept": "application/json;odata=verbose",
        "Content-Type": "application/json;odata=verbose",
        "X-RequestDigest": $("#__REQUESTDIGEST").val(),
        "X-HTTP-Method": "POST"
    },
    success: function(data, status, xhr) {
        console.log("success");
    },
    error: function(xhr, status, error) {
        console.log("error");
    }
});}

If you have multiple selections for user and group fields and for selection fields, create data as below

function createEmployeeDetailsListItem(excelRow) {
var data = {
    __metadata: {
        type: "SP.Data.E2EVMVulnerabilitiesMappingMasterListItem"
    },
    Title: excelRow("Title"),
    ID: excelRow("ID"),
    DateCol: new Date(excelRow("Datecolumn")).toISOString(), //Datecolumn
    PersonGroupColId: { 'results': excelRow("Persongroupcolumn") }, //Here excelRow("Persongroupcolumn") is array of multiple choice - When you field set as Allow Multiple
    ChoiceCol: {
        "__metadata": {
            "type": "Collection(Edm.String)"
        },
        "results": excelRow("Choicecolumn") //Here excelRow("Choicecolumn") is array of multiple choice - When you field set as Allow Multiple
    }
}

$.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('Test')/items",
    type: "POST",
    data: JSON.stringify(data),
    headers: {
        "Accept": "application/json;odata=verbose",
        "Content-Type": "application/json;odata=verbose",
        "X-RequestDigest": $("#__REQUESTDIGEST").val(),
        "X-HTTP-Method": "POST"
    },
    success: function(data, status, xhr) {
        console.log("success");
    },
    error: function(xhr, status, error) {
        console.log("error");
    }
});}

Manage safety data sheets in the SharePoint document library

I want to manage safety data sheets in the SP document library
Requirement:

  1. IDH (unique number for each material) – The total number of safety data sheets is 200 * 3 + image (200No.)
  2. Supplier 1
  3. Supplier 2
  4. Supplier 3
  5. Suppliers for valid safety data sheet 3 attach (validity period of the safety data sheet is 3 years from date of printing / date of origin) – trigger required if the document ID is out of date.
  6. Photo of the product (master sample photo) – (Must be seen live, not as filename)
  7. Search index with name, IDH or finished name (list of RM will be sent to this FG) – Can be created and updated in a separate list

Can this database be created in SP?

Office 365 – 520 Error while forwarding Outlook 365 to Sharepoint

I have this flow that receives an attachment via email and creates a new file on sharepoint. The process works for smaller reports, but for a larger report I receive (41 MB), I get a 520 error. I receive this report daily and would like to automate the publication of the report on sharepoint. Has anyone fixed this problem? Thanks.

{
"Message": "API hub token exchange internal server error.",
"SourceUri": "https://power-te-northeurope-3.azurewebsites.net//exchange",
"IsCachedResponse": "false"
}

Enter image description here

sharepoint enterprise – Unrecognized TypeError: visitorIDs.push is not a function

First and foremost, you must declare an array at the beginning of your code / function, such as:

var visitorIDs = ();

Then in setTimeout Function that you can use as follows:

visitorIDs.push(ResolvedToUser.Id);

So you need to remove the following line from your code, which is not required:

visitorIDs = ResolvedToUser.Id;

I'm not sure how you feel ResolvedToUser.Id and your logic for retrieving all user IDs from person selection is correct or not.

However, the code above will help you solve your problem Uncaught TypeError,

Respond – Issue when going through a value entered in TextField in SPFx and when adding to a SharePoint list

I'm doing a little project there, using the SharePoint Framework with React to add tulips to a SharePoint list.

I use Textfield etc. from UI Fabrics and PnPJs to retrieve data from lists. It works fine to add hard-coded statuses when you click the "ADD" button. This will not work if you try to enter a value from the text box.

This is how the app looks now:
Enter image description here

Here is code:

EnfokamTulips.tsx:

import * as React from 'react';
import styles from './EnfokamTulips.module.scss';
import { IEnfokamTulipsProps } from './IEnfokamTulipsProps';

import AddTulips from './AddTulips'

export default class EnfokamTulips extends React.Component {
  public render(): React.ReactElement {
    return (
      
Tulips!
); } }

AddTulips.tsx:

import * as React from 'react';
import { TextField } from 'office-ui-fabric-react/lib/TextField';
import { DefaultButton } from 'office-ui-fabric-react';
import { sp, ItemAddResult } from '@pnp/sp';

export interface IEnfokamTulipsState {
    title: string;
    manufacturingCost: number;
}

this.state = {
    title: 'book',
    manufacturingCost: 2
}


function addTulipsToList(event) {

    // get all the items from a list
    sp.web.lists.getByTitle("Tulips").items.select("Title").get().then((items: any()) => {
    console.log(items);
});

// add an item to the list
    sp.web.lists.getByTitle("Tulips").items.add({
        Title: event.target.value,
        Manufacturing_x0020_cost: event.target.manufacturingCost //Internal name of column
        }).then((iar: ItemAddResult) => {
            console.log(iar);
    });
}

let addTulips = (event) => {
    return(
        
) } export default addTulips;

IEnfokamTulipsProps.ts:

export interface IEnfokamTulipsProps {
  description: string;
}

export interface IEnfokamTulipsState {
  title: string;
  manufacturingCost: number;
}

export interface TulipsLists{
  value: TulipsList();
}
export interface TulipsList{
  Title: string;
  Manufacturing_x0020_cost: number; 
}

The only thing that happens right now when I click on "ADD" is this:
Enter image description here

All data in each column is empty.
What am I doing wrong?
What I want is that whatever I type in the text boxes, I want to go through it and show it in the list when I click on "ADD".

Every help is appreciated.