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");
    }
});}

To center the site and the float list in the left sidebar on the right

Hi Guys,

I have not written any code for three years and HTML is not my thing, and when I come back, I have to start from scratch. So take it with me when I ask stupid questions or too much.

I'm trying to center the entire site and move the list to the right in the left sidebar. The result is as ugly as the attached picture.
SEMrush

So far I have been trying:




    my page
 
    
    
 
    
 
    
 

    
  • 1
  • 2
  • 3
  • 4
  • 5

Code (surcharge):

The CSS:


*,
*:before,
*:after {
  box-sizing: border-box;
}
html, body {height: 100%; margin: 0px;}
/* Left Sidebar */
#left-sidebar {
    margin: 0;
    padding: 0 0.5em 0 0;
    width: 4em;
    float: left;
}
#left-sidebar ul li {float: right;}
/* Content Container */
#content-container {
    margin: 0;
    padding: 0.5em;
    float: left;
    width: 50em;
    border-left: 0.08em solid #ccddee;
    border-right: 0.08em solid #ccddee;
}
/* Right Sidebar */
#right-box {
    margin: 0;
    padding: 0 0 0 0.5em;
    height: 100%;
    float: left;
}
#right-sidebar {
    padding-left: 2em;
    float: left;
}

ul {list-style: none;}
.wrapper {
    margin: 0 auto;
    padding: 0;
}
.visuallyhidden {display: none;}

Code (surcharge):

Thanks in advance for your help.

PHP list bank information on page

PHP list error ** bold text **

The list appears as shown in the picture. Brings the bank account more confused

Read code from the list

include_once 'conexao.php';


$querySelect = $link->query("select * from tbEntrada");

while($registros = $querySelect->fetch_assoc()): {
        # code...
    }   
    $iCerveja = $registros('iCerveja');
    $iQuantidade = $registros('iQuantidade');
    $iValorU = $registros('iValorU');

    echo "";
    echo "$iCerveja$iQuantidade$iValorU";
    echo "";

endwhile;

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.

How do I filter a long list of sites from Google Search?

I have a list of sites that I want to permanently exclude from Google's search results. This is a large family of sites that plagiarize questions and answers from the StackExchange network (some of which are machine translated) qaru.site, I created a search engine in Chromium with a URL like this one https://google.com/search?q=%s+-site:site1+-site:site2+-...+-site:siteN, with around 30 sites on the black list. After I blacklisted another page, Google of course began to complain:

"site: qano.site" (and all subsequent words) was ignored because queries are limited to 32 words.

So some of these blacklisted domains are not really on the blacklist.

I've tried using Chromium extensions to filter search results, but they generally work at a higher level. It filters only the results page, so I often have an almost empty page, instead of displaying the pages with more relevant results, as they do -site:domain.com Token in the search query.

How can I permanently set up a revocation list for a potentially large number of websites? I'd rather not have to sign up for Google.

How do I define a condition that ends during the loop iteration of the Python list?

I'm having trouble with this Python practice problem:

Write a function, a sublist, that takes a list of numbers as parameters. Use a while loop in the function to return a sublist of the input list. The sublist should contain the same values ​​as the original list until it reaches number 5 (it should not contain the number 5).

Here's my try, but is_valid is never set to false.

def sublist(lst):
  is_valid = True 
  ret_lst = () 
  while is_valid:
    for x in lst:
      print(x, is_valid)
      if x == 5:
        is_valid == False
      else:
        ret_lst.append(x)

  return ret_lst

lst = (1,2,3,4,5)
print(sublist(lst))

8 – Drush or Drupal console command to list modules with security updates?

Is there a command for Drupal 8.x that shows available updates?

I added forms_steps 1.1 with and SA and a security update that is required in the web UI to update to 1.2

Web UI that indicates that a security update is required

I tried drush pm:security However, it is reported that there is no outstanding security.

root@d568732a8640:/app# drush pm:security
 [success] There are no outstanding security updates for Drupal projects.

I may have overestimated the ability of this command, so I'm looking for alternatives to get both an update and a security update to the console. My goal is to include a schedule job in our CI reporting on it.