Looping through a SharePoint List to compare a field value with another List Item ID in Powershell

I have two Lists. A Calendar Lists and a Custom List
In one List I have multiple records all with an ‘EventID’ field which relates to a Calendar record (The record ID)

I am trying to use PowerShell to recurse through each Custom List record and check to see if the ‘EventID’ has a relating ‘Calendar ID’ in the Calendar record. If not, it means the Calendar entry has been deleted and the ‘Orphaned’ field in the Custom List record should be set to ‘YES’. There may be multiple records in the Custom List per Calendar Entry. I need to update ALL records WITHOUT a valid Calendar Entry to ‘Orphaned’.

Although not finished, so far I have this code, but I’m sure there must be a better way to do this, and a different way so that once a MISSING ‘EventID’ is found (the Calendar entry is deleted) then the loop stops and moves on to the next Calendar entry. My mind has just gone blank.

cls
#Add Snapin
Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue

Start-Transcript -Path "D:SharePointScriptsEmailTranscript.txt"

#Set Variables
$spWeb = Get-SPWeb -Identity "http://ds.stylus.com"
$PClist = (Get-SPWeb "http://ds.stylus.com").Lists("PreventionCalendar")
$DElist = (Get-SPWeb "http://ds.stylus.com").Lists("DirectEngagement")
$DEvID = "EventID"
$DEvStatus = "Status"

#Get Today's Date - var: $now
$now = Get-Date 
Write-Host "Today is:" $now

$PCitems = $PClist.Items
#show the item count for the library
Write-Host "PreventionCalendar - Total Records: $($PCitems.count)"

$DEitems = $DElist.Items
#show the item count for the library
Write-Host "DirectEngagement - Total Records: $($DEitems.count)"

if($PCitems.count -lt 1)
{
    foreach($item in $DEitems)
    {   
       $DEID = $item.ID
       #Get the DE Status value
       $DEvStat = $item($DEvStatus)
       #Get the DE EventID value
       $DEvIDent = $item($DEvID)           
                
       Write-Host "PreventionCalendar is Empty. Orphan Appliance"
       $SPListItem = $DElist.GetItemById($DEID)
       $SPListItem("Status") = "Appliance Orphaned"
       $SPListItem.Update()
     }
}
elseif($PCitems.count -ge 1)
{

    foreach($item in $DEitems)
    {
        $DEID = $item.ID
        #Get the DE Status value
        $DEvStat = $item($DEvStatus)
        #Get the DE EventID value
        $DEvIDent = $item($DEvID) 

        Write-Host -Foregroundcolor Green "Checking..... Appliance ID:" $DEID "EventID:" $DEvIDent 

            foreach($item in $PCitems)
            {
                $PCID = $item.ID
                Write-Host -Foregroundcolor Red "IF 'EventID'" $DEvIDent "EQUALS 'CalendarID'" $PCID "run.." 
                
                if($DEvIDent -eq $PCID)
                {
                    Write-Host "Appliance ID:" $DEID "EventID:" $DevIDent "Matched with PreventionCalendar ID:" $PCID
                    {break}
                }
                else
                {
                    Write-Host "Appliance ID:" $DEID "EventID:" $DevIDent "PreventionCalendar ID: No Match Found"
                }
            }
            
        
        
                
     }          
                
                
}

Write-Host "Orphaned Appliances Updated"

Any help would be appreciated.

Rick

python – In getting a list of all possible partitions of an integer with restraints, is there a better way?

I have modified a recursive function designed to print all the integer partitions of a positive integer to create a function that returns all partitions of the “number” parameter if they include a number contained in the “interesting” parameter. I would like to use this for very large numbers (10-50 million), but am getting errors referring to the recursion depth. My question is whether there is a way to do this more efficiently by recursion, and if not, whether there is another way to do this.

def partition(number, interesting): # returns all the partitions of number that are included in the interesting list
    answer = set()
    if number in interesting:
        answer.add((number, ))
    
    for x in range(1, number):
        if x in interesting: 
            for y in partition(number - x, interesting):
                answer.add(tuple(sorted((x, ) + y)))
    return answer
```

How to manipulate solution outputs that appear in a list?

I have a list {E, {p, ϕ}}, and I need values E, p, and ϕ such that I can later on do operations with them (like ArcCos(p), etc.). I will be repeatedly generating the values in the list, as a list, so doing this by-hand is not an option. How do I get them out of the list?

In this case, the values E, p, and ϕ exist such that they appear as p -> 0.097, ϕ -> 0.03, etc. I need them such that calling, for example, for list = {E, {p, ϕ}}, list((2,1)) yields 0.097 and not p -> 0.097. This is the issue.

Import/Export between Excel and Calendar list SharePoint 2019

I need to Import/Export between Excel and Calendar list in SharePoint 2019 on Premise.

I have an Excel file that is updated as a calendar file, and I need to be able to have that information update a SharePoint Calendar file,
as well as update the excel file from the SP Calendar file if any changes are made there.

Thank you

List Of Countries Where Toilet Papers Are Out-Of-Stock Due To COVID-19 | NewProxyLists

In my country, less than 1% use toilet paper, thus, we have abundant supply of toilet papers. As a matter of fact, the cheapest 2-ply toilet paper in my hometown only cost less than 0.10 USD per pc. But other countries are panic buying of toilet papers, resulting to toilet paper manufacturers can’t keep on demand.

I just thought, why not I sell toilet papers in those countries that need it?

Because BeerMoneyForum is a place where we help each other to make money online, is there anybody here that would like to be reseller of toilet papers in their countries? Or suggest a buy and sell Facebook group where people are looking toilet papers?

Finding lower boundary of a 3D object in list format

I have the following point list and would like to find the points located in the lower boundary of the 3D object (It is part of a body torso).

https://pastebin.com/L12n0Gfr

I am using the following script. However, in the end it shows just one point which is not correct. I think the reason is that the lower boundary points are not aligned with a straight line. Any help is really appreciated.

B3 = Select(data3D, MemberQ(#, Min( data3D((All, 2)))) &);

World-Bases.com – the best domains list on various CMS: WordPress, Joomla, Magento, Drupal etc. – Websites & Domains

World-Bases – service for selling lists of sites/domains on a variety of CMS. In the presence of more than 40 CMS containing more than 1500 domain zones, here are just a few of them:

  • WordPress
  • Joomla
  • Magento
  • Drupal
  • OpenCart
  • All delegated domains
  • All alive sites (HTTP Response Code 200)
  • All online shops

Verification is carried out exclusively on fresh lists of all delegated domains received directly from registrars (gTLD, ccTLD, IDN, New gTLD), as well as lists of subdomains collected from private services and DNS records.
For verification, proprietary software is used. Databases are updated on a regular basis. The quality of the databases at the time of publication of the update is at least 95%.

How to check the quality of the base?
Each database has a selection of 100 random domains/sites (from the current database), which you can see for free and evaluate the quality of the database itself before buying.
And also on the site there are complete lists of domain zones (with the number of domains in the database for each domain zone) for each of the main databases, for example:

WordPress
100 random sites from the current database – https://world-bases.com/api/example.php?cms=wordpress
Information on domain zones – https://world-bases.com/api/info.php?cms=wordpress

Joomla
100 random sites from the current database – https://world-bases.com/api/example.php?cms=joomla
Information on domain zones – https://world-bases.com/api/info.php?cms=joomla

Magento
100 random sites from the current database – https://world-bases.com/api/example.php?cms=magento
Information on domain zones – https://world-bases.com/api/info.php?cms=magento

Drupal
100 random sites from the current database – https://world-bases.com/api/example.php?cms=drupal
Information on domain zones – https://world-bases.com/api/info.php?cms=drupal


All databases can be bought online on the out website: https://world-bases.com/en/

Contacts:
Telegram: https://t.me/wbits
Jabber: wb@creep.im

.(tagsToTranslate)domains(t)sites(t)bases

list manipulation – Replacing a submatrix of a matrix

Minding the fact that

In[102]:= {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}[[1 ;; 2, 1 ;; 2]]

Out[102]= {{1, 2}, {4, 5}}

is the upper left submatrix.

I would like to do the following :

> helios = {{{3, 2}, {1, 2}}, {{3, 2}, {2, 1}}, {{3, 1}, {2, 2}}, {{1, 
>     3}, {2, 2}}, {{2, 3}, {1, 2}}, {{2, 3}, {2, 1}}, {{1, 2}, {3, 
>     2}}, {{2, 2}, {3, 1}}, {{2, 1}, {3, 2}}, {{2, 1}, {2, 3}}, {{1, 
>     2}, {2, 3}}, {{2, 2}, {1, 3}}}

ReplacePart[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}, {1 ;; 2, 
     1 ;; 2} -> #] & /@ helios

That is, i would like to replace the upper left submatrix by a series of other matrices !
But this does not work as :

ReplacePart::pkspec1: The expression 1;;2 cannot be used as a part specification.

Does anyone have a efficient way of doing this ? with built-in functions if possible.

Thank you very much.

list manipulation – Substituting values from an association thread into a table of expressions

I have asked a question here. Yet I am trying to do the same procedure with AssociationThread Suppose I have the following function which is a normal distribution:

(Sigma) = 4.75;
(Mu) = 3.96;
f(x_) := 1/((Sigma)*Sqrt(2 (Pi)))
   Exp(-(1/2) ((x - (Mu))/(Sigma))^2)

and I have the following list:

cases={2, 8, 9, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 28, 30, 34, 37, 43, 
55, 59, 90, 129, 180, 229, 276, 349, 396, 446, 571, 794, 1152, 1572, 
1965, 2282, 2679, 3225, 3905, 4814, 5745, 6826, 7860, 9068, 11084, 
13106, 15368, 17975, 20633, 23005, 25443, 28956, 32719, 36802, 40814, 
44865, 48188, 51221, 55551, 60024, 64256, 68271, 71776, 74771, 77456, 
80762, 84179, 87782, 91219, 94644, 97217, 99301, 102374, 105368, 
108129, 110897, 113666, 115476, 116880, 119100, 121384, 123731, 
125852, 127804, 129042, 130001, 131623, 133233, 134671, 136117, 
137141, 138034, 138759, 140004, 141102, 142177, 143070, 143979, 
144612, 145249, 146191, 147209, 148030, 148778, 149483, 149937, 
150322, 150832, 151375, 151917, 152371, 152806, 153147, 153452, 
153900, 154379, 154821, 155135, 155457, 155666, 155872, 156171, 
156481, 156846, 157120, 157391, 157652, 157860, 158139, 158447, 
158735, 158982, 159217, 159367, 159486, 159687, 159891, 160059, 
160209, 160325, 160382, 160391, 160391}
Prob = Table(NIntegrate(f(x), {x, i, i + 1}), {i, 1, 141});
(Alpha) = 
  AssociationThread(Table(Subscript(t, i), {i, 1, 141}) -> cases);
(Beta) = 
  AssociationThread(Table(Subscript(c, i), {i, 1, 141}) -> cases);
(Gamma) = 
  AssociationThread(Table(Subscript(p, i), {i, 1, 141}) -> Prob);

I want to replace the values from alpha, beta and gamma accordingly into the following table:

Table(1/(Subscript(c, j) - (1 - (Theta)) Subscript(t, j))
   Sum(Subscript(p, 
    n) (Subscript(c, n) - (1 - (Theta)) Subscript(t, n)), {n, 2, 
    141}), {j, 1, 140})

I wonder how one can achieve this?

sharepoint designer – Get the ID of a List Item copied during a workflow

You can’t, but you can do the reverse. Using the Copy item action does not give you any useful return value to be able to reference the copied item. But, what you can do is add a number field (maybe called OriginalItemID? And maybe make it hidden so that user’s can’t edit the value?) to the library where you are making the copies. Then, right after you have initially copied the document, set the copy’s OriginalItemID field to be the ID of the current item.

Then when the workflow runs again, you can find the copy based on the OriginalItemID value matching the current item ID.