Power Automate issue from Microsoft Form Get Responses trigger, where email attachment File Content shows previous submission - outlook

I have created a Quality Audit in Microsoft Forms that I've Power Automated. This is the first flow i've ever built and could use some help!
After the trigger of When a new response is submitted, the flow works as follows:
Add a row into a table (this works in parallel with the Update a Row below - i'm having no issues with this step)
Update a Row in a table to act as an individual scorecard - where the table has all of the Form questions and the row updates based on the corresponding Get Response Details. Basically all submissions would use the same base Excel file in Onedrive, that has a template that shows the Get Response Details and calculates a score based on an IF formula.
Copy File saves a copy of the template scorecard to the same Onedrive folder, with a unique file name based on the Get Response Details of employee name, date, and form ID.
Get File Metadata Using Path - identical to the path of the Copy File above.
Get File Content based on the ID of the Get File Metadata.
Send an email (V2) to the manager with an attachment (using the Display Name of the Copy File & File Content).
Beginning of flow
Send email V2 flow
As for the problem, after the Form is submitted, the email attachment reflects the File Content of the previous form submission and not the current. But what I interesting is that:
The name of the file is correct based on the Copy File step.
When I look at the actual copy of the file saved to Onedrive - it's correct with all the right info. It's only the email attachment that seems to be an issue.
When I manually re-submit the trigger from the 28 Day Run History, this time the File Content of the emailed scorecard is accurate. Even when it's re-submitted seconds to minutes of the initial submission.
To try to fix:
Added in a Delay (30 seconds to 2 minutes) at various steps thinking that perhaps the flow was completing too quickly - it was copying the file and sending the emailed attachment before the system could update the table. But this had no effect.
Used different dynamic content for the Get File Metadata/Content steps. In addition to ID, I also tried by File Path, Name, & Etag. I also tried the ID of the Copy File instead of the File Metadata. These had no effect.
Did the Copy File first - meaning I saved a copy of the initial blank scorecard to a unique file name and then did Update a Row based on said copied file. But because Update a Row works can only work off one single file and does not have an option for File Path - I could only use ID of Copied File, which did not work.
Tried using Sharepoint instead of Onedrive - same deal.
Used Share Link to Web URL - but when you click the link - it also takes you to a form with the right file name, but the previous submissions file content.
Ideally I need the initial Form submission to show the right data in the emailed scorecard the first time, because I'm not going to go through and manually re-submit the trigger each time a new form is submitted.
Any help and suggestions are greatly appreciated!!

Related

Can I have more than one attachment open at a time? Access/Oracle BLOB attachments

Good day all,
Problem: Users cant have more than one attachment open at a time.
Goal: Provide a way for users to have more than one attachment open at a time.
Set up: Win 10, MS Access Ver. 2112 (should be latest version as of post date), split FE/BE, Oracle 11g2.
Operation: Users create a record via a main form. Each entry represents a task to be carried out. The main form, contains a sub form that allows multiple attachments to be saved per record. The subform is a linked table from Oracle, connected through ODBC, and the column storing the attachments is BLOB. This functionality is working great.
Situation: Some of the processes that users carry out require management review. This means that a manager will pull up the record in Access and begin opening the attachments. Because some of the review processes require comparison of the attachments, it has become problematic because only one attachment can be open at a time.
Example: A record contains an attachment in the subform. Left click only attempts to edit the thumbnail that has been automatically placed in the field. Instead, a user will right click->document object->Open. This will open the attachment in whatever program the users desktop has associated with that file type. In this case, let's assume that the file is a MS Word doc. MS Word will open with the document. Everything functions as it should until the user right clicks on the next attachment to open it. This causes the Word doc to close, leaving MS Word open but with no document displaying.
Note: While the MS Word attachment is open, in the upper left hand corner, the words "Document Saved to this computer", with a combo next to it can be seen. Clicking the combo reveals that the document has been given a temporary name and is being temporarily held in the Word program folder in App Data.
Clunky work around: At this time, the only option for the users is to open the attachment, save it to a local folder, and repeat for each attachment. Once all the attachments are all saved, the reviewer can go about their business. This was problematic enough for users to inform me about their dissatisfaction with the functionality. I know, shocking. lol
Help!: What I'm seeking are suggestions and methods for either making it work in the way the users need or for some sort of work around, like, coding for access to gather and save all attachments to a given location.
If you read this far, thank you.

Microsoft Access unable to display image attachment (Runtime Error 2220)

I have a table called "Subsidiary Companies" where I store the names of different subsidiary companies and their corresponding company logo images as an attachment in a table.
I have a form called "invoice" where I use it to generate invoices. Whenever I select a subsidiary from a Combobox, it will change the image attachment box on my form to the one corresponding to the company selected.
After I attach the image to the table it worked. When I closed my entire access program and went back to it, it doesn't work anymore even though I did not change any codes, settings or image path. I got an error instead, "Runtime Error 2220: Microsoft Access can't open the file image.jpeg".
Here is my code to select the attachment image based on the company selected:
Me.AttachmentCompanyLogo.DefaultPicture = Me.ComboboxCompanySelection.Column(1)
Not sure where it went wrong as I am not very familiar with Access, would appreciate some help, thank you :)
based on this statement: " When I closed my entire access program and went back to it, it doesn't work anymore"
that behavior would occur if you failed to also include the primary/foreign key cross reference value in the record. such that when you next go to select it - it can't be found because when you added the image/path it also needed the key value as a cross reference...
this is just a guess of course...
look directly at the table and see if this data is missing...
on a different topic; if you have only a small quantity of images the use of attachments is ok however if there will be a larger quantity then one should not use the attachments feature and instead store the image docs in a separate folder while putting the path to the image doc in a table.

MS Dynamics CRM 365 - import data from Excel files

I'm getting into MS Dynamics CRM 365 programming, and have been dealing with data imports of lookup / reference entities.
I created a new entity with just the default Name column, stored and published it, and then went to look at in CRM. From the default "main" view, I choose the "Data Import" option and downloaded a template .xlsx file, which I then filled out. After that, I chose "Import Data" and uploaded this filled out .xlsx, and it was submitted, parsed, transformed successfully and the rows I had entered show up as expected.
So far, so good.
Now I created a second lookup entity (again with just the Name field), published it, and thought I'd be smart and just "re-use" that .xlsx "template" I had downloaded for the first lookup entity, and enter the new values for the second lookup entity, and then upload this manually "recycled" file. I did change the file name of the .xlsx, as well as the worksheet name, to match the name of the second lookup entity.
And while the upload, the parsing and transforming worked just fine - the actual rows I had inserted ended up in the first lookup entity...
So my conclusion is: somewhere, CRM must keep track of what entity that .xlsx was indended for - and it's neither the file name of the .xlsx, nor the name of the worksheet (which I had also updated) - it must be stored somewhere else.
Does anyone know where?? Can I change it somehow (manually or programmatically)?
After I went through the full cycle again (download import template .xlsx, fill that out, upload that file) - it works just fine for the second lookup entity, too.
There will be a hidden sheet in Excel file, but we cannot unhide it. That’s where all the configurations are stored.
But you can see it when you do something like explained in this blog, you have to click “View code” option from context menu, by right clicking sheet name tab in Excel file.
Then by opening the “Project explorer”, the hidden sheet will be visible in VBA, set the visibility to 1 – xlSheetVisible. Don’t save anything.
I believe the issue lies in the hidden first three columns, the first of which contains the entity name in the header.
When working with import templates, especially when exporting for reimport, these columns are key. The first column holds the Guid of the record, the checksum tells the system if the user touched the data in the row, and the modifiedOn allows the system to know if the data was changed in the system after the export.

How to add Custom Fields to Order and Quote

i am trying to create custom text field on checkout page as shipping method section by follow by given link (
http://tutorialsformagento.blogspot.in/2014/06/add-custom-fields-to-order-and-quote.html)
Step 1 is working fine and text fields are showing but i want to save it in order table if proceed to next step
Step 2 (Save the field in Quote and Order Tables) is confusing me in which folder and file i write installer code.
so please help me in which location i save installer code becoz i am new in magento.
Thanks

turbogears querying the database for file

I am using the Turbogears-2.3 framework and now I know how to upload the files in the database using the tgext.datahelpers. I understand that the file gets uploaded in the disk and in the database the metadata gets stored in the JSON format. Now I want to query the database and wanted that the link to get generated in the file collumn so if someone clicks on it then the file can get downloaded. However when I tried to query the database and viewed the table, in the file column I get text like trai.model.model.F_AttachedFile object at 0xa7325bac (trai is the name of the project).
When I iterated through the table and printed the value of the element in the javascript console, the same thing is getting printed. Could anyone please tell me how to generate the downloadable link from this.
Thank you very much
Not sure that I full understood your question, a little snippet of code might have helped understanding the context, but if I guessed correctly you are trying to the the url of a tgext.datahelpers uploaded file.
In such case see https://bitbucket.org/axant/tgext.datahelpers#rst-header-attachments each attachment Column provides an url property, so you can get the URL from there.
There is also an example that saves and Document model with a file field and queries it back printing the url.

Resources