variables
6 TopicsTee-Object / -OutVariable into existing array (i.e., add into that array - is this doable?)
Hello, I have some Exchange reporting scripts where I'd like to offer the option to export CSV automatically but always send the output to standard output stream as well. I though about using Tee-Object like this: foreach ($y in $yadayada) { [PSCustomObject]@{ p1 = $y.v1 p2 = $y.v2 } | Tee-Object -Variable preExistingArray } I would later then like to do this: if ($ExportCSVs) { $preExistingArray | Export-Csv ... } ...and by that time, nobody was waiting at the console for all their objects to collect before being output all at once. That is the difference from my usual approach which is more like: 1-Collect everything into variable;2-output variable (all objects) to std output stream; 3-export to CSV. Thought I could use Tee-Object to combine 1 and 2. I don't think it's possible. So, wondering if anyone else has something clever in this area? Please do share.1.6KViews0likes4CommentsEscape characters in Set Variable in flow so that I can post to Slack
So, I have a variable, I am carrying from the top - and I have an email, I capture the body from. Now I want to post that body to slack - of course, I need to escape the HTML characters otherwise JSON format breaks. How do I use string functions inside this value area? Am I on the wrong track here? Thanks to all those who take the time to answer 🙂 Happy new year.Creative SharePoint Calendar and Power Automate Solution
Hey Community, I have a unique calendar to track data on company vehicles that I need help with. I'll explain how we were doing it and how I would like it to change. This is going to be a detailed explanation so thank you for reading. Currently we track departure and return miles for each vehicle we issue out. We were doing all of this in On Prem using Infowise to do the logic, but we have migrated over to Online and now I want to restructure the logic with Power Automate. In On Prem, we had a separate list that stored the vehicle names and that was linked to the calendar via an Infowise Master-Detail Lookup field. Then we had a separate list that would store the departure mileage of each vehicle. In the calendar, whenever someone would log the RETURN miles, an infowise action would run and that return miles number would be dropped into the DEPARTURE miles list for the correct vehicle. This was so that when a new reservation was made for that vehicle, the previous return miles would be the new departure miles. See attached picture to see the On Prem version of the calendar list. Ex: the white cargo van was issued out with departure miles at 1000, when it comes back it its return miles are 1050. This 1050 gets put into the return miles list and conditional logic drops that number into the field for the white cargo van and not another vehicle. When the white cargo van is issued again, an infowise action runs and autopopulates the Departure miles field with the 1050 number from the return miles list. And so on. Now that we are in SPO, we don't have Infowise and I want to restructure the logic with Power Automate. Is there a better way to accomplish this with Power Automate than how we did it with Infowise and storing values in other lists? I'm thinking we could make use of variables and storing the return miles into a variable and recalling that variable for the departure miles on a new reservation. But it would have to be conditional to make sure the vehicle name is the same and its not getting data from another vehicle. Just trying to make it to where we don't have so many extra lists to pull and store data in. There's got to be an efficient way to accomplish this with Power Automate. I just don't quite know where to start. Any ideas? Thanks for reading through!1.1KViews0likes0CommentsUsing variables in select and xml files
Hi I have created a t-sql that read an xml file and store it into ms sql 2016 database. DECLARE @x xml, @@XML_Location VARCHAR(255) = 'FROM OPENROWSET (BULK ''''\\xmlsrv\proxml\' @XML_File VARCHAR(255) = 'GEN.xml', ; SELECT @x = P --FROM OPENROWSET (BULK '\\xmlsrv\proxml\GEN.xml', SINGLE_BLOB) AS Element(P) @XML_Location & @XML_File, SINGLE_BLOB) AS Element(P) ....... .... The script works if i use the from statement directly, but if I try to use declared variables it fails with message: Msg 102, Level 15, State 1, Line 16 Incorrect syntax near '@XML_Location '. What am I doing wrong? BR Dan-Ketil1.5KViews0likes0CommentsStatistical models in Excel
Hi Guys, I am trying to see how I can build a simple statistical model in Excel. Let's say I have 10 salespeople. For each of them, they have sold X amount of the year. I want to see the relationship between data I've collected about their differing sales experience, industry experience, calls, demos and see whether there is a correlation in positively affecting their sales performance for that year. I haven't used statistical modeling in Excel very much. Does anyone have an indication how I can set it up in Excel? Any tips would be huge. Many thanks in advance.4.2KViews0likes1Comment