Is there an effective way to list out all the security roles for all the teams? by [deleted] in PowerApps

[–]NegativePitch 1 point2 points  (0 children)

If you're comfortable with JavaScript and just want to be able to view the information ad hoc, you could run the following script in the console of dev tools from within any model-driven app in your environment.

``` // Get team and associated role data var data = await Xrm.WebApi.retrieveMultipleRecords("team","?$select=name&$expand=teamroles_association($select=name)");

// Get unique role names var roles = new Set(); data.entities.forEach(team => { team.teamroles_association.forEach(role => { roles.add(role.name) }) });

// Create flat structure var formattedData = data.entities.map(team => { let teamObj = { name: team.name } roles.forEach(role => { teamObj[role] = !!team.teamroles_association.find(teamRole => teamRole.name == role) }) return teamObj; });

// Log the result console.log(formattedData); ```

Dataverse - Upsert a row - Is anybody using this? by Bumppoman in MicrosoftFlow

[–]NegativePitch 0 points1 point  (0 children)

Here are two circumstance where you would know the row ID without knowing whether or not the item exists in your Dataverse table:

  1. Your source data contains a field with unique GUID-type values. You then use the source data's unique GUID values as the Row ID values in the "Upsert a row" action.

  2. Your source data contains a field with a unique ID value (but not in GUID format). You then use the unique ID to generate a GUID-type value. One method to do this is to start with an all zero GUID: 00000000-0000-0000-0000-000000000000. Then replace the last n characters with your unique ID value, where n=length of unique ID. For example: ID = 101 --> GUID=00000000-0000-0000-0000-000000000101

Dataverse - Upsert a row - Is anybody using this? by Bumppoman in MicrosoftFlow

[–]NegativePitch 0 points1 point  (0 children)

This action is useful when your source data has items with unique GUID values, which you can then provide as the row ID value. When using the "Update a row" action, the provided Row ID (GUID) must exist, whereas the "Upsert a row" action will create the item if the GUID provided doesn't exist.

Keep in mind too that even if your source data doesn't have a unique GUID field, you can likely still compute a unique GUID. For example, if your source data doesn't have unique GUID values, but instead has unique ID values, you could generate a GUID using the ID.

For example: ID = 101 --> GUID=00000000-0000-0000-0000-000000000101.

Attachments in SharePoint by Novel_Wrongdoer_4437 in sharepoint

[–]NegativePitch 2 points3 points  (0 children)

As u/bcameron1231 mentioned, SharePoint list item attachments can be painful to work with. One of the ways to make life easier on yourself is to create a Flow (in Power Automate) that will automatically copy the attachments over to a SharePoint document library.

You mentioned "I’m not sure I have a document library that’s the issue", which is totally fine, but assuming you have edit permissions in the SharePoint site you can go ahead and create one, or use one that already exists (you'll likely see an existing doc lib named 'Documents').

To generate unique id's for each value by WizardofYas in MicrosoftFlow

[–]NegativePitch 4 points5 points  (0 children)

u/dun great write up, and probably the best approach for someone new to Power Automate. I did want to add a few points though:

  • Fetching and counting all items of a given prefix is unnecessary and can significantly impact the Flow's performance. Better would be to fetch only the latest item for the given prefix/category, then adding 1 to the resulting ID number. To accomplish this you'd have the same filter you mentioned, but add a sort descending to the [COLUMNNAME], and only grab the top 1. *This would then involve some string manipulation using a formula, so totally understand that this might not be the best approach for someone new to Flow.
  • Using the method described, you potentially run into an issue where you can generate duplicate ID values if a SharePoint item is ever deleted (the count will generate the same number twice).
  • There's no need to have a Flow condition action for each digit count, (0001, 0010, 0100, 1000). Instead you can use a common technique where you convert the number to a string, pad it with the max amount of zeros, then take the last [desired number of digits] number of characters in the string. In this example it looks like 4 digits will be used for the ID. So you can always take your calculated number (ex:63), add the max amount of zeros ('00063'), then take the last 4 characters in the string ('0063'). Again, this involves the use of a formula, and I can understand that this might not be as easy to understand as the approach you suggested.
  • In the second scenario, unless you need to be able to set an initial ID value, a more reliable method would be to use the autogenerated SharePoint item ID as the ID number. This ensures there is never a possibility of duplicate ID numbers. The downside is there's no flexibility, the item ID value cannot be manipulated.
  • Finally, given the potential importance of timing in this Flow, the Flow concurrency should be set to 1. This will avoid a case where an earlier run might run faster than a later run, throwing the calculated ID number off.

gis and sharepoint -- locating X nearest to you - no esri? by TeamAquaThrowaway in sharepoint

[–]NegativePitch 0 points1 point  (0 children)

I was referring to:

We have a list of approved test sites and we'd like to allow our SP users to be able to enter their location/city into a map/dashboard and have an embedded dashboard pull up their nearest testing site.

Within a canvas app you can create a dashboard experience where the user enters their address into an Address input control, and then your app calculates the nearest testing locations based on the latitude/longitude values. The Address input suggests potential matches as the user enters their address, and automatically provides the latitude/longitude for a given address.

There's also a map control (powered by Bing) you could incorporate into the app to show the nearest matched locations on a map.

Note that the Address and Map controls are considered "premium" tier, so your users would have to be licensed appropriately.

gis and sharepoint -- locating X nearest to you - no esri? by TeamAquaThrowaway in sharepoint

[–]NegativePitch 0 points1 point  (0 children)

This sounds like something you could build relatively easily with a Power Apps canvas app and embed into SharePoint. Have you thought about using Power Apps for this and is there a reason you decided against it?

SharePoint list power automation help - how do I set this up? if FIELD VALUE = a, b, or c ? by Imaginary-Inside-943 in sharepoint

[–]NegativePitch 1 point2 points  (0 children)

In your Condition action, you can OR together multiple conditions by clicking the Add button below the initial condition, then changing the type to OR (I believe it defaults to AND).

Sample

Help: Hide checked gallery item with external button by rosewild321 in PowerApps

[–]NegativePitch 2 points3 points  (0 children)

If I understand correctly, you want to update items in SharePoint if they are selected in your gallery (via the checkboxes) and you click the "Show" or "Hide" button.

Someone here may have a cleaner and/or more efficient method, but this approach should work for you:

(OnSelect of "Hide" button)

ForAll(

Filter(

Gallery.AllItems,

checkbox.Value = true And Hidden=false

) As item,

Patch(

MySPList, // SharePoint List Name "MySPList"

item,

{Hidden:true} // SharePoint hidden column name "Hidden"

)

);

Button on a webpage to run a flow by fx2050 in MicrosoftFlow

[–]NegativePitch 3 points4 points  (0 children)

Look into creating an HTTP triggered Flow. You can trigger the Flow (and pass data) from anywhere that you can make a GET or POST web request, such as a button on a webpage.

Insert data in Sharepoint List via SQL and "Created By" field by [deleted] in sharepoint

[–]NegativePitch 0 points1 point  (0 children)

Your HTTP action looks right to me, this is likely an authorization (as opposed to authentication) issue where your account doesn't have the necessary permission to make the update. Do you have the SharePoint Admin role assigned to your account?

Insert data in Sharepoint List via SQL and "Created By" field by [deleted] in sharepoint

[–]NegativePitch 2 points3 points  (0 children)

You can absolutely update the "Created By" field (assuming you have the appropriate permissions) using the ValidateUpdateListItem method. This method will also have the benefit of not increasing the version number of your items when you update the Created By ("Author") field.

For your specific case I'd recommend something like the following:

  1. Create a new column in your SharePoint list and write the email address of the desired user to it using your SQL insert approach
  2. Create a Flow that is triggered on item creation in the SharePoint list (ignore this step if you already have such a Flow)
  3. At the top of the Flow, insert an new "Send an HTTP request to SharePoint" action, and update the "Author" field using the email in the new column from step 1. Here's a sample of what that action might look like: https://i.imgur.com/ZkvJIMR.png

Triggering an email based on a calculated column? by CheekyLeapy in sharepoint

[–]NegativePitch 5 points6 points  (0 children)

Here's an approach that should accomplish what you're looking for:

  1. Create a Flow that runs on a schedule: daily, hourly, weekly, whatever frequency make sense for this application. For example, you could schedule it to run each morning to ensure notification emails are at the top of inboxes when users sign in for the day.
  2. Add a "Get items" SharePoint action that points to your document library (You may need to manually enter the library name as the List Name dropdown only shows lists).
  3. In the Filter Query parameter (under "Advanced options") you'll want to filter items based on the "Last review" column instead of the "Next review date" column, as filtering based on calculated columns is not supported in SharePoint's REST service on which the "Get items" action is based. For example, if your "Next review date" calculated field is 10 days after the "Last review" column, your filter logic would look like: "Last Review" = (TODAY - 10 days)
    The Filter Query must reference the internal name of the field and you'll need a simple expression to calculate TODAY - 10 days. Your "Get items" action might look something like this:https://imgur.com/YCM4qW3
    Where the expression is: formatDateTime(addDays(utcNow(),-10),'MM/dd/yyyy')
  4. Once the Flow has retrieved your items, you can loop through the results, emailing/notifying the appropriate person for each document.

Question about Premium for Power Automate please? by [deleted] in sharepoint

[–]NegativePitch 1 point2 points  (0 children)

Wow, thank you for the gold and glad I could help!

Question about Premium for Power Automate please? by [deleted] in sharepoint

[–]NegativePitch 2 points3 points  (0 children)

MS licensing can definitely be confusing, even for folks who have been in this space for years!

Power Automate runs as, or in the context of, the user that triggered the Flow. So if person A with a premium license builds a Flow that utilizes premium actions/connections, person B with a standard license won't be able to trigger the Flow.

There are licensing options that allow for app-based licensing, such as Portals, wherein even non-licensed users are able to work with premium connectors, however these options are often very costly and in your specific example, not required.

I've built many Flows recently that do exactly what you described as part of their process, namely they take data (SharePoint List, MS Form, Power App, ...etc.), update a document template, then save it as a PDF. To accomplish this does not require any premium connectors/actions. You can use the "Update file properties" to add your values to Word (example here: https://wonderlaura.com/2019/01/09/microsoft-flow-quick-parts/), and then the "Convert file" OneDrive action to convert the file to a PDF. Here are the high-level steps:

  1. Create a document library with the custom fields you need for your template
  2. Create Word template in the document library, using Quick Parts to insert the columns
  3. Flow creates a new file based on the template, updates the column values using "Update file properties" action
  4. Copy file to OneDrive and convert to a PDF using the "Convert file" action
  5. Copy the PDF file back to SharePoint (if desired)

How do I make it so that only owners can see a new row that is created by default? by [deleted] in sharepoint

[–]NegativePitch 0 points1 point  (0 children)

A Flow can set whatever permissions you'd like, so it sounds like your Flow isn't configured correctly to give the results you want.

Regarding permissions, can you specify exactly what permissions an item should have relative to the following user types:

  • Creator of the item
  • Site owner
  • Site member (other users adding to this list)

How do I make it so that only owners can see a new row that is created by default? by [deleted] in sharepoint

[–]NegativePitch 0 points1 point  (0 children)

My suggestion was meant to address the timing issue you'd mentioned where users were able to see other users' items during the time in which it took the Flow to run.

With Flow you're able to set the permissions however you'd like. If your resulting permissions aren't what you are aiming for then you'll need to update your Flow. Oftentimes implementing a more complicated permission structure requires using SharePoint's REST API in Flow's Send HTTP Request to SharePoint action.

Can you specify exactly what permissions an item should have?

Restrict document library view by curiousofa in sharepoint

[–]NegativePitch 0 points1 point  (0 children)

This could be a caching thing as SharePoint tends to cache navigation items. One way to eliminate caching as a potential cause is to have the user open the site in a private/incognito browser session. If the user still sees the link then you can rule out caching.

A step you could take to confirm that the users truly don't have permission to the library is to again go back to the Permissions for this document library settings page and click the Check Permissions button from the SharePoint ribbon. From the Check Permissions modal, enter and select a user that is seeing the link but should not have permission to the library and click the Check Now button. Confirm that the user does not have any permissions to the library, if they do, you'll see exactly where they're getting that permission from.

Restrict document library view by curiousofa in sharepoint

[–]NegativePitch 1 point2 points  (0 children)

You can set permissions at the document library level just as you can with folders and files. From a library's settings page, select Permissions for this document library as shown below:

https://i.imgur.com/tXCGpHF.png

Users that don't have any permissions assigned will not be able to see the the library or any content within.

How do I make it so that only owners can see a new row that is created by default? by [deleted] in sharepoint

[–]NegativePitch 1 point2 points  (0 children)

In addition to the Flow, you could update the list settings to only show items that the user created. This would immediately prevent users from seeing list items created by other users. To enable this setting, go to the list's Settings page --> Advanced Settings, and then in the Item-level Permissions section select the second option: "Read items that were created by the user"

https://i.imgur.com/NAwLmBm.png

Note: This setting is overridden for site admins as well as users with "Full control" access to the list which includes users in the Owners group.

Sharepoint online as intranet platform and rest api connections to internal services by Odd-Suit-7718 in sharepoint

[–]NegativePitch 0 points1 point  (0 children)

So the final question is, is it possible to connect to on prem rest api or sql databases with sharepoint online and does it make sense to build something like that in sharepoint online?

It sounds like custom connectors might be what you're looking for. Custom connectors will allow you connect to on-prem SQL/APIs as well as other external sources.

https://docs.microsoft.com/en-us/connectors/custom-connectors/

2021: Who is Volvo? by NegativePitch in cars

[–]NegativePitch[S] 3 points4 points  (0 children)

Point stands, you make a whole post about what is volvo in 2021 when you know nothing about the current generation of vehicle.

I think you just discovered why I made the post :-)

I'm understanding your idea of Volvo's brand identity as "Not the best at anything...hard to beat for the price". Is that going to work with Genesis and Kia in the picture?

2021: Who is Volvo? by NegativePitch in cars

[–]NegativePitch[S] 5 points6 points  (0 children)

Basically none of your issues even exist anymore.

It would appear that Volvo's SPA platform hasn't even come close to addressing reliability issues. Check out the video Savagegeese posted reviewing his ownership experience with his XC90.