How to retrieve the orphaned workflows from SharePoint 2013 using PowerShell

In SharePoint 2013, A list has few items and to each item few tasks are attached. Each task is associated with a workflow. But when a task is deleted the corresponding workflow to the deleted item is still running. How to retrieve such orphaned workflows and find the total count of such workflows in the site.

Removed /usr/lib/libstdc++.6.0.9.dylib – how to retrieve the original?

I’m on macOS Mojave and accidentally removed the following library:

/usr/lib/libstdc++.6.0.9.dylib

Upon booting up the system, I am greeted by the login screen followed by a black screen.

I have managed to mount the filesystem under Linux. Would replacing the original file fix the issue? If so, where can I get the right version of the library?

Retrieve Items in Video Document Library using PowerShell

I’m wanting to retrieve all items within a Video Library on SharePoint and grab the owners/Created By list and all that I haven’t been able to target videos only.

I’m able to pull in all of the document libraries:
enter image description here

How do I pull items in only from the Video library?
enter image description here

Here is what I currently have:

# Add SharePoint Snapin to PowerShell if((Get-PSSnapin | Where {$  _.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $  null) {   Add-PSSnapin Microsoft.SharePoint.PowerShell } $  web = Get-SPWeb "http://sourcevideo.f.com" $  Data = foreach ($  list in $  web.Lists) {         if ($  list.BaseType -eq “DocumentLibrary”) {             foreach ($  item in $  list.Items) {                 foreach($  version in $  item.Versions){                 $  data = @{                         "Version" = $  version.VersionLabel                         "List Name" = $  list.Title                         "Created By" = $  item["Author"]                         "Created Date" = $  item["Created"]                         "Modified By" = $  item["Editor"]                         "Modified Date" = $  item["Modified"]                         "Item Name" = $  item.File.Name                         "URL"=$  web.Site.MakeFullUrl("$  ($  web.ServerRelativeUrl.TrimEnd('/'))/$  ($  item.Url)");                 }                 New-Object PSObject -Property $  data | Select "List Name", "Item Name", "Version", "Created By", "Created Date", "Modified By", "Modified Date", "URL"                 }             }             $  web.Dispose();         }     } $  Data  |  Export-Csv C:\Users\ptadmin\Desktop\process7.csv -NoTypeInformation 

A better way to retrieve data in firebase using redux

So i want to be able to make the following method inside of componentWillMount more robust, and essentially put this method inside an actions function.

Post.js

class Post extends Component {      constructor(props){         super(props);          this.state = {             description: '',             username: '',         }          this.handleChange = this.handleChange.bind(this);         this.handleSubmit = this.handleSubmit.bind(this);     }      // I want to use the method in this component inside of my actions file in redux, now sure how to do this though.      componentWillMount(){         // gets the current userId.          const currentUserId = this.props.userId        // gets the users         const collection = fire.collection('users');         collection.get().then(snapshot => {                  snapshot.forEach(doc => {                  // if user id matches the logged in user id select the data                 if(doc.data().uid === currentUserId){                     this.setState({                         username: doc.data().username,                     })                      }                    });          });        }     handleSubmit = (e) => {        e.preventDefault();        let description = this.state.description        let username = this.state.username        const post = {           description,           username        }        this.props.createPost(post)       this.props.history.push('/dashboard')      } 

Actions.js

// the username and the data is being passed in this function export const createPost = (post) => {     return (dispatch, getState) => {         // async call to the database         fire.collection('posts').add({             description: post.description,             username: post.username,             createdAt: new Date()         }).then(() => {             dispatch({type: 'CREATE_POST', post})         }).catch((err) => {             dispatch({type: 'CREATE_POST_ ERROR', err})         })     } }  export const CurrentUser = () => dispatch => {      // this is ignoring the username set in firestore     // firebaseAuth = firebase.auth() so it doesn't reference the      //firestore users        firebaseAuth.onAuthStateChanged((user) => {         if (user) {             dispatch({                 type: SET_USER,                  payload: user             })             // console.log(user)         }       });  }  // Need a way to get the currentUser without having to loop through the  // users and matching it with the currentUser uid. 

CurrentUser is being called here, i do

App.js

class App extends Component {      constructor(props){         super(props)         this.state = {             loading:true         }     }     componentWillMount() {         this.props.CurrentUser();           this.setState({             loading:false         })     } 

Try to retrieve not only the members of SP visitors group but also the other columns with PnPPowershell

I have this code below to retrieve all the members of the sharepoint visitors group. But the visitors group contains also other columns like job, departments etc. How can I retrieve the other columns as wel.

Get-PnPGroupMembers -Identity "ICT Operations - Bezoekers" | select title 

Greetings, P

Cleaner way to retrieve data using redux within react

I want to make the following code more robost, and less repetitive. In my opinion it looks hacky, and not well written code.

At the moment the dashboard page is responsible for, fetching users, and fetching post content. I know there is a way to do this in redux, within an action function. However, my knowledge of using redux is not quite developed.

I will be providing a stackblitz to this(its not loading up atm)

I just want to make this more redux friendly, and cleaner. Given the actions file, and the dashboard file.

Dashboard.js

import React, {Component} from 'react'; import {fire} from '../firebaseConfig'; import { connect} from "react-redux"; import moment from 'moment'; import  '../index.css'; import {withRouter, Redirect} from "react-router-dom"; import Card from '@material-ui/core/Card'; import CardContent from '@material-ui/core/CardContent'; import Typography from '@material-ui/core/Typography';  const styles = {   card: {     minWidth: 275,     margin:'40px 0px',    },   p:{       margin:'20px 0px',       letterSpacing: '2.7px',       fontSize:'0.8em',       fontStyle: 'italic'   },   h:{     letterSpacing: '5px'    } };  class Dashboard extends Component{      constructor(props){         super(props)          this.state = {             username:"",             loading: true,             posts:{}         }      }     componentWillMount(){         this.getPosts();     }        getPosts() {         const collection2 = fire.collection('posts');         collection2.get().then(snapshot => {             let arr = [];             snapshot.forEach(doc => {                  arr.push(doc.data()); //Collect all the items and push it into the array             })             this.setState({                 posts: arr,             })             console.log(this.state.posts)         })       }       componentDidMount(){         if(this.props.userId){             const collection = fire.collection('users');             collection.get().then(snapshot => {                    snapshot.forEach(doc => {                  this.setState({                     username: doc.data().username,                     loading:false                 })                                });                });          }      }      render(){         if (!this.props.userId) return <Redirect to='/' />         const { loading, posts } = this.state;          if(loading){            return(             <div className="loader"></div>            )          }         return(             <div className="container">                  <div className="row">                     <div className="col-md-6 mt-3">                         <h1>Welcome {this.state.username.toLowerCase()}</h1>                          {posts.map((post, key)=> {                             return(                                  <Card key={key} style={styles.card}>                                         <CardContent>                                          <Typography variant="h4" component="h2" style={styles.h}>                                             {post.description}                                         </Typography>                                         <Typography component="p" style={styles.p}>                                             by: {post.username}                                         </Typography>                                          <Typography component="p">                                             by: {moment(post.createdAt.toDate()).calendar()}                                         </Typography>                                      </CardContent>                                 </Card>                             );                          })}                     </div>                 </div>             </div>           );     }   }  const mapStateToProps = (state) => ({     userId: state.auths.userId })   export default withRouter(connect(mapStateToProps, null)(Dashboard)); 

Actions.js

import { auth as firebaseAuth } from '../firebaseConfig' import {fire} from '../firebaseConfig' import { history } from '../components/Navbar';  export const SET_USER = "SET_USER";  export const signUp = (user) => { return (dispatch) => {     firebaseAuth.createUserWithEmailAndPassword(user.email.trim(), user.password)      .then(resp => {             return fire.collection('users').doc(resp.user.uid).set({               username:user.username,               email: user.email,               password: user.password,               uid: resp.user.uid              });           })         .then(() => {             dispatch({ type: 'SIGNUP_SUCCESS' });           })         .then((response) => {             history.push('/dashboard');         }).catch((err) => {             dispatch({ type: 'SIGNUP_ERROR', err});         });       }  }  export const signIn = (user) => { return (dispatch) => {      firebaseAuth.signInWithEmailAndPassword(user.email, user.password)         .then(()=> {             dispatch({type: 'SIGNIN_SUCCESS'})         }).then((response) => {             history.push('/dashboard');         }).catch( (err) => {             dispatch({ type: 'SIGNIN_ERROR', err});         });     }  }  export const signOut = () => { return (dispatch) => {          firebaseAuth.signOut().then(() => {             dispatch({ type: 'LOGOUT_SUCCESS'})         })     } }   export const CurrentUser = () => dispatch => {     firebaseAuth.onAuthStateChanged((user) => {         if (user) {             dispatch({                 type: SET_USER,                  payload: user             })         }       });  }  export const createPost = (post) => {     return (dispatch, getState) => {         // async call to the database         const profile = getState().firebase.profile;         const authorId = getState().firebase.auth;         fire.collection('posts').add({             description: post.description,             username: post.username,             createdAt: new Date()         }).then(() => {             dispatch({type: 'CREATE_POST', post})         }).catch((err) => {             dispatch({type: 'CREATE_POST_ ERROR', err})         })     } } 

Reducers.js

import { SET_USER} from '../actions/'; const initialState = {     authError: null,     isAuthenticated: false,     userId: null,     user: {} }  export default (state = initialState, action) => {     switch (action.type) {         case SET_USER:             return ({                 userId: action.payload.uid || null,                 // user:action.payload,                 isAuthenticated: true             })         case 'LOGOUT_SUCCESS':             console.log('signout success')             return ({                 ...state,                 userId: null,                 isAuthenticated: false             })              case 'CREATE_POST':              console.log('created post', action.post)             return state;          case 'CREATE_POST_ERROR':             console.log('create post error', action.err)             return state;             case 'SIGNUP_SUCCESS':                   return ({                 ...state,                 authError: null             })          case 'SIGNUP_ERROR':             console.log('signup error')             return ({                 ...state,                 authError: action.err.message             })          case 'SIGNIN_SUCCESS':             console.log('signin success')             return ({                 ...state,                 authError: null             })          case 'SIGNIN_ERROR':             console.log('signin error')             return ({                 ...state,                 authError: action.err.message             })         default:             return state     } } 

Can’t retrieve all Items from all lists that reside on a single subsite

SP Community, I am absolutely stumped and desperate for help. I have been up and down StackExchange trying to get 3 separate attempts to – 1. query all of the lists within a subsite and to then – 2. filter the query based on criteria in the title.

I need to retrieve all items within each list in a subsite. Once I do that, I need to filter by list title so that only information from lists containing “RDTEN” or “procurement” in their title get parsed. With the end result, I need to build a graph for the aggregated information.

Please see attempts below, these are my starting points, none of which are currently working:

AJAX Test with Multiple Lists – Ajax

<script type="text/javascript"> var siteUrl = 'https://site/subsite';  // Load the required SharePoint libraries. $  (document).ready(function () {      // The js files are in a URL in the form:     // web_url/_layouts/15/resource_file     var scriptbase =  siteUrl  + "/_layouts/15/";      // Load the js files and continue to     // the execOperation function.     $  .getScript(scriptbase + "SP.Runtime.js",     function () {         $  .getScript(scriptbase + "SP.js", execOperation);         }     ); });  // Function to execute basic operations. function execOperation() {      // Continue your program flow here.     retrieveWebSiteProperties(siteUrl);  }  function retrieveWebSiteProperties(siteUrl) {     var clientContext = new SP.ClientContext(siteUrl);     this.oWebsite = clientContext.get_web();     this.collList = oWebsite.get_lists();     this.listInfoCollection = clientContext.load(collList);      clientContext.executeQueryAsync(         Function.createDelegate(this, this.onQuerySucceeded),          Function.createDelegate(this, this.onQueryFailed)     ); }  function onQuerySucceeded(sender, args) {      var listInfo = '';     var listEnumerator = this.collList.getEnumerator();     while (listEnumerator.moveNext()) {         var oList = listEnumerator.get_current();         listInfo += 'Title: ' + oList.get_title() + ' Created: ' +  oList.get_created().toString() + '\n';     }     $  ("#chartArea").html(listInfo);  }  function onQueryFailed(sender, args) {     alert('Request failed. ' + args.get_message() +          '\n' + args.get_stackTrace()); } </script>  <body> <div id="chartArea"></div> </body> 

CSOM

<script type="text/javascript"> var context; var web; var collList; $  (document).ready(function () {     SP.SOD.executeFunc('sp.js', 'SP.ClientContext', getLists); });  function getLists() {     context = new SP.ClientContext.get_current();     web = context.get_web();     collList = web.get_lists();     context.load(collList);     context.executeQueryAsync(onRequestSuccess, onRequestFailure); } function onRequestSuccess() {     var listInfo = '';     var listEnumerator = collList.getEnumerator();     while (listEnumerator.moveNext()) {         var oList = listEnumerator.get_current();         if(oList.get_title().indexOf("pro") !== -1){ //if title contains "pro"             listInfo += '<div>Title: ' + oList.get_title() + ' Created: ' +  oList.get_created().toString() + '</div>';         }     }      $  ("#chartArea").html(listInfo); } function onRequestFailure(sender, args) {     $  ("#chartArea").html('Request failed. ' + args.get_message() + '\n' +  args.get_stackTrace()); } </script>  <body> <div id="chartArea"></div> </body> 

REST

<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  <title>Test with Multiple Lists - Rest</title> </head>  <script type="text/javascript"> // Set the REST endpoint to use.  // This one includes a filter to only return lists whose title includes "Site" var url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists?  $  filter=substringof('Site',  Title)";  // Create the AJAX request using jQuery.  var request = jQuery.ajax({ url: url, headers: { "Accept":  "Application/json;odata=nometadata" } });     // Use a .then() callback to do something with data after its returned by the server  request.then(      function (d) {       // For each result in the set of returned data       d.value.forEach(           function (i) {               // Print the Title of the list to the console               console.log(i.Title);           });   });   </script>  <body> <div id="chartArea"></div> </body> 

Note: My original question was put on hold for being unclear, I wrote a new question in hopes to provide additional clarity.

IOS application used pooling based method to retrieve newest data

Currently we have an IOS dev application using pooling based method to retrieve lastest data from REST API only if the apps is launched by user. It will keep pull the data from API periodically for 3 ~ 5 seconds when the app is active.

At the same time we also using APN service for push notification.

The question is: if we submit this IOS application to app store, will it be rejected by Apple because of using periodically pooling method? Apple has suggested the right way using APN for status update in background.