I want to populate a table with specific data from an app - is there a way I can tell a patch to take a specific entry on a collection. For example:
I want to use the "2" from "Rest Room/Canteen" in the following expression:
ForAll(col_actionRequired,
Patch(
'Form - Site Inspection Reports',
Defaults('Form - Site Inspection Reports'),
{
'Primary Key': _formName,
Name: _uploaderName,
'Project Number': _projectNumber,
Signature: signatureOutput.Image,
'Problem Area': problemArea,
'Action Required': actionRequired,
'Have the changes been made?': "No",
'Rest Room / Canteen': col_combined.XYZ
}
)
);
is this possible?
Hi @JeckGill
'Rating Score': ThisRecord.RatingScore,
or
'Rating Score': col_combined[@RatingScore],
should work.
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
so for the last line in that expression I have
'Rest Room / Canteen': col_combined.XYZ //where col_combined.XYZ would be the collection entry marked as "2"
I don't want 'Rating Score' to be put through, just the score itself
>>I don't want 'Rating Score' to be put through, just the score itself
With regards to this, where do you store the 'score itself'? Is this a column in your col_actionRequired collection? If so, can you post the contents of this collection?
the collection is quite large - so I wouldn't be able to post all entries; hence why I only put a snippet of them earlier. Here are more of the entries just so you have an idea.
There are 49 items, they get rated either N/A or 1-5. All of them need to be uploaded and they have their own column that they correlate with in the PowerApps table.
my plan was to just take the rating value from the collection based on it's location (they should always be created in the same order, I can't see why they wouldn't so it was the best way I could think of doing this), and patch that through to the table
Thanks for the explaination. Just to clarify my understanding, you'd like to Lookup the value of RatingScore in col_combined, where the RatingTitle equals "Rest Room/Canteen" (ie, 2) and to patch this to 'Form - Site Inspection Reports'?
If so, the syntax would look like this:
ForAll(col_actionRequired,
Patch(
'Form - Site Inspection Reports',
Defaults('Form - Site Inspection Reports'),
{
'Primary Key': _formName,
Name: _uploaderName,
'Project Number': _projectNumber,
Signature: signatureOutput.Image,
'Problem Area': problemArea,
'Action Required': actionRequired,
'Have the changes been made?': "No",
'Rest Room / Canteen': LookUp(col_combined, RatingTitle="Rest Room / Canteen").RatingScore
}
)
);
Hi @JeckGill
'Rating Score': ThisRecord.RatingScore, or 'Rating Score': col_combined[@RatingScore],
would patch the score value, e.g. 2, to a datasource column named "Rating score". Chose this bc no column name was provided 😉
You can patch any column like so.
Do I get it right, that every column name corresponds to the records RatingTitle in your collection?
If so, this might work:
ThisRecord.RatingTilte: ThisRecord.RatingScore,
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
I've been trying @timl's method - I have it almost working I think. But I have red lines under the whole patch now 😅
I get two messages when I hover the cursor over these;
- "The type of this argument 'gg_pub'accessegress' does not match the expected type 'OptionSetValue (Site Inspection Rating)'. Found type 'Text'.
- "The function 'Patch' has some invalid arguments.
Below is the current expression for reference:
ForAll(col_actionRequired,
Patch(
'Form - Site Inspection Reports',
Defaults('Form - Site Inspection Reports'),
{
'Primary Key': _formName,
Name: _uploaderName,
'Project Number': _projectNumber,
Signature: signatureOutput.Image,
'Problem Area': problemArea,
'Action Required': actionRequired,
'Have the changes been made?': "No",
'Rest Room / Canteen': LookUp(col_combined, RatingTitle="Rest Room / Canteen").RatingScore,
'Changing Facilities': LookUp(col_combined, RatingTitle="Changing Facilities").RatingScore,
'General Cleanliness': LookUp(col_combined, RatingTitle="General Cleanliness").RatingScore,
'Site offices and welfare electrical cert in date': LookUp(col_combined, RatingTitle="Site offices & welfare electrical cert in date").RatingScore,
'First aid facilities / first aider': LookUp(col_combined, RatingTitle="First Aid Facilities/ First Aider").RatingScore,
Washing: LookUp(col_combined, RatingTitle="Washing").RatingScore,
Sanitation: LookUp(col_combined, RatingTitle="Sanitation").RatingScore,
PPE: LookUp(col_combined, RatingTitle="PPE").RatingScore,
'Fire extinguisher checked & in date - welfare': LookUp(col_combined, RatingTitle="Fire extinguisher in date & checked").RatingScore,
'Environmental Factors': LookUp(col_combined, RatingTitle="Environmental Factors").RatingScore,
'Accident Records': LookUp(col_combined, RatingTitle="Accident Records").RatingScore,
'Statutory forms / registers etc. ': LookUp(col_combined, RatingTitle="Statutory forms / Registers etc.").RatingScore,
'Access / Egress': LookUp(col_combined, RatingTitle="Access / Egress").RatingScore,
'Signs & Notices': LookUp(col_combined, RatingTitle="Signs & Notices").RatingScore,
'Tidiness - Storage Areas': LookUp(col_combined, RatingTitle="Tidiness").RatingScore,
Flammables: LookUp(col_combined, RatingTitle="Flammables").RatingScore,
Gases: LookUp(col_combined, RatingTitle="Gases").RatingScore,
'Fuels & Lubricants': LookUp(col_combined, RatingTitle="Fuels / Lubricants").RatingScore,
'Fire precautions - Storage Areas': LookUp(col_combined, RatingTitle="Fire Precautions").RatingScore,
'Tools & Equipment': LookUp(col_combined, RatingTitle="Tools & Equipment").RatingScore,
'Spillage kits': LookUp(col_combined, RatingTitle="Spillage Kits").RatingScore,
'Access Equipment': LookUp(col_combined, RatingTitle="Access Equipment").RatingScore,
'Dangerous Materials (COSHH)': LookUp(col_combined, RatingTitle="Dangerous Materials (COSHH)").RatingScore,
'PAT Testing in date': LookUp(col_combined, RatingTitle="PAT Testing in date").RatingScore,
'Quarantine Area': LookUp(col_combined, RatingTitle="Quarantine Area in place & used").RatingScore,
'COSHH - SDS assessments': LookUp(col_combined, RatingTitle="COSHH - SDS Assessments in place").RatingScore,
'LOLER in date': LookUp(col_combined, RatingTitle="LOLER in date").RatingScore,
Scaffolding: LookUp(col_combined, RatingTitle="Scaffolding").RatingScore,
'Ladders & Trestles': LookUp(col_combined, RatingTitle="Ladders / Trestles").RatingScore,
'Working Platforms': LookUp(col_combined, RatingTitle="Working Platforms").RatingScore,
Services: LookUp(col_combined, RatingTitle="Services").RatingScore,
Security: LookUp(col_combined, RatingTitle="Security").RatingScore,
'Extinguisher checked + in date - ConsAct': LookUp(col_combined, RatingTitle="Extinguisher in date").RatingScore,
'Call points checked': LookUp(col_combined, RatingTitle="Call points checked").RatingScore,
Electrical: LookUp(col_combined, RatingTitle="Electrical").RatingScore,
Hoists: LookUp(col_combined, RatingTitle="Hoists").RatingScore,
'Mobile Crane': LookUp(col_combined, RatingTitle="Mobile Crane").RatingScore,
'Lifting Gear': LookUp(col_combined, RatingTitle="Lifting Gear").RatingScore,
Excavations: LookUp(col_combined, RatingTitle="Excavations").RatingScore,
Transport: LookUp(col_combined, RatingTitle="Transport").RatingScore,
'Other Plant': LookUp(col_combined, RatingTitle="Other Plant").RatingScore,
Machinery: LookUp(col_combined, RatingTitle="Machinery").RatingScore,
'Power Tools': LookUp(col_combined, RatingTitle="Power Tools").RatingScore,
'Hand Tools': LookUp(col_combined, RatingTitle="Hand Tools").RatingScore,
'Tidiness - Construction Activities': LookUp(col_combined, RatingTitle="Tidiness").RatingScore,
'Noise Levels': LookUp(col_combined, RatingTitle="Noise Levels").RatingScore,
'Traffic Management': LookUp(col_combined, RatingTitle="Traffic Management").RatingScore,
'Restricted Area': LookUp(col_combined, RatingTitle="Restricted Area").RatingScore
}
)
);
EDIT 1:
Now I'm just even more confused - I ran a quick check just to double check it was working. No issue:
Is there any reason it should be giving me a problem I'm not aware of?
EDIT 2:
Text(LookUp(col_combined, RatingTitle="Access / Egress").RatingScore) generates the exact same as the image in Edit 1 - but makes no difference to the error this comment initially talks about
@VauBee Have you seen something similar before?
not 100% sure.. is "N/A" part of your Choice(s)-columns OptionSet-Values? Error says: Hey, I expect an OptionSetValue, but you're a giving me text... did you try to append .Value or transform it to Value()?
I'm still curious, if
ThisRecord.RatingTilte: ThisRecord.RatingScore,
would work 😉
absolutely positive that N/A is an option, however it's numerically assigned to 0
just to make sure I change the value selected and ran through it again on the check sheet
wrapping it in Text() and Value () both get this
Appending .Text and .Value changes it to an error
I'm unsure how to use your
'Rating Score': ThisRecord.RatingScore,
lines would work - the collection that the ForAll is working from is different to the one where the ratings are stored so I don't think "ThisRecord" would work. The ForAll uses all in col_actionRequired; all these ratings are being taken specifically from col_combined. I have tried your "'Rating Score': col_combined[@RatingScore]" line but that didn't do much; which lead me down the LookUp path. I feel there is something obvious I'm missing but I've been staring at this problem for so long now I can't make heads or tails of it 😂
I'll append code again at the end of this message- but here's the gist of what I am trying to do just incase it helps you understand my problem a bit more 😅
col_actionRequired stores the name of a problem that received a rating of 1 or 2, as well as whatever the user has written in the app which would serve as a means to mitigate the issues. Each row will repost the same data except for the col_actionRequired parts; which means I have added a toggle just to tick off when the changes have been made.
In the end, my PowerApps table will look (very very abstractly) like this:
PrimaryKey | Problem title | Problem Fix | Ratings 1-49 |
key1 | PPE | blah blah blah | x x x x x x x |
key1 | Access/Egress | blah blah blah | x x x x x x x |
key2 | First Aid | blah blah blah | x x x x x x x |
key2 | Fire Precautions | blah blah blah | x x x x x x x |
key2 | PPE | blah blah blah | x x x x x x x |
key3 | Tidiness | blah blah blah | x x x x x x x |
Here's the code again; if you have any more questions please do ask as I am at my wits end with this and I am so close to using my laptop as a sled to go down the stairs 😅
ForAll(col_actionRequired,
Patch(
'Form - Site Inspection Reports',
Defaults('Form - Site Inspection Reports'),
{
'Primary Key': _formName,
Name: _uploaderName,
'Project Number': _projectNumber,
Signature: signatureOutput.Image,
'Problem Area': problemArea,
'Action Required': actionRequired,
'Have the changes been made?': "No",
'Rest Room / Canteen': LookUp(col_combined, RatingTitle="Rest Room / Canteen").RatingScore,
'Changing Facilities': LookUp(col_combined, RatingTitle="Changing Facilities").RatingScore,
'General Cleanliness': LookUp(col_combined, RatingTitle="General Cleanliness").RatingScore,
'Site offices and welfare electrical cert in date': LookUp(col_combined, RatingTitle="Site offices & welfare electrical cert in date").RatingScore,
'First aid facilities / first aider': LookUp(col_combined, RatingTitle="First Aid Facilities/ First Aider").RatingScore,
Washing: LookUp(col_combined, RatingTitle="Washing").RatingScore,
Sanitation: LookUp(col_combined, RatingTitle="Sanitation").RatingScore,
PPE: LookUp(col_combined, RatingTitle="PPE").RatingScore,
'Fire extinguisher checked & in date - welfare': LookUp(col_combined, RatingTitle="Fire extinguisher in date & checked").RatingScore,
'Environmental Factors': LookUp(col_combined, RatingTitle="Environmental Factors").RatingScore,
'Accident Records': LookUp(col_combined, RatingTitle="Accident Records").RatingScore,
'Statutory forms / registers etc. ': LookUp(col_combined, RatingTitle="Statutory forms / Registers etc.").RatingScore,
'Access / Egress': LookUp(col_combined, RatingTitle="Access / Egress").RatingScore.Value, //line with the current issue
'Signs & Notices': LookUp(col_combined, RatingTitle="Signs & Notices").RatingScore,
'Tidiness - Storage Areas': LookUp(col_combined, RatingTitle="Tidiness").RatingScore,
Flammables: LookUp(col_combined, RatingTitle="Flammables").RatingScore,
Gases: LookUp(col_combined, RatingTitle="Gases").RatingScore,
'Fuels & Lubricants': LookUp(col_combined, RatingTitle="Fuels / Lubricants").RatingScore,
'Fire precautions - Storage Areas': LookUp(col_combined, RatingTitle="Fire Precautions").RatingScore,
'Tools & Equipment': LookUp(col_combined, RatingTitle="Tools & Equipment").RatingScore,
'Spillage kits': LookUp(col_combined, RatingTitle="Spillage Kits").RatingScore,
'Access Equipment': LookUp(col_combined, RatingTitle="Access Equipment").RatingScore,
'Dangerous Materials (COSHH)': LookUp(col_combined, RatingTitle="Dangerous Materials (COSHH)").RatingScore,
'PAT Testing in date': LookUp(col_combined, RatingTitle="PAT Testing in date").RatingScore,
'Quarantine Area': LookUp(col_combined, RatingTitle="Quarantine Area in place & used").RatingScore,
'COSHH - SDS assessments': LookUp(col_combined, RatingTitle="COSHH - SDS Assessments in place").RatingScore,
'LOLER in date': LookUp(col_combined, RatingTitle="LOLER in date").RatingScore,
Scaffolding: LookUp(col_combined, RatingTitle="Scaffolding").RatingScore,
'Ladders & Trestles': LookUp(col_combined, RatingTitle="Ladders / Trestles").RatingScore,
'Working Platforms': LookUp(col_combined, RatingTitle="Working Platforms").RatingScore,
Services: LookUp(col_combined, RatingTitle="Services").RatingScore,
Security: LookUp(col_combined, RatingTitle="Security").RatingScore,
'Extinguisher checked + in date - ConsAct': LookUp(col_combined, RatingTitle="Extinguisher in date").RatingScore,
'Call points checked': LookUp(col_combined, RatingTitle="Call points checked").RatingScore,
Electrical: LookUp(col_combined, RatingTitle="Electrical").RatingScore,
Hoists: LookUp(col_combined, RatingTitle="Hoists").RatingScore,
'Mobile Crane': LookUp(col_combined, RatingTitle="Mobile Crane").RatingScore,
'Lifting Gear': LookUp(col_combined, RatingTitle="Lifting Gear").RatingScore,
Excavations: LookUp(col_combined, RatingTitle="Excavations").RatingScore,
Transport: LookUp(col_combined, RatingTitle="Transport").RatingScore,
'Other Plant': LookUp(col_combined, RatingTitle="Other Plant").RatingScore,
Machinery: LookUp(col_combined, RatingTitle="Machinery").RatingScore,
'Power Tools': LookUp(col_combined, RatingTitle="Power Tools").RatingScore,
'Hand Tools': LookUp(col_combined, RatingTitle="Hand Tools").RatingScore,
'Tidiness - Construction Activities': LookUp(col_combined, RatingTitle="Tidiness").RatingScore,
'Noise Levels': LookUp(col_combined, RatingTitle="Noise Levels").RatingScore,
'Traffic Management': LookUp(col_combined, RatingTitle="Traffic Management").RatingScore,
'Restricted Area': LookUp(col_combined, RatingTitle="Restricted Area").RatingScore
}
)
);
Dear Community Members, We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd. During this period, members will not be able to Kudo, Comment, or Reply to any posts. On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities. What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!
We are excited to announce the Summer of Solutions Challenge! This challenge is kicking off on Monday, June 17th and will run for (4) weeks. The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities. Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”) - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024 Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods. You must enter into each weekly Entry Period separately. How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different. Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers. At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing. Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner. A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random. Individuals will be contacted before the announcement with the opportunity to claim or deny the prize. Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners. Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event. ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE** Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08 23 @WarrenBelz 31 @DBO_DV 10 @Amik 19 AmínAA 6 @mmbr1606 12 @rzuber 4 @happyume 7 @Giraldoj 3@ANB 6 (tie) @SpongYe 6 (tie) Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08 10@WarrenBelz 25 @DBO_DV 6@mmbr1606 14 @AmínAA 4 @Amik 12 @royg 3 @ANB 10 @AllanDeCastro 2 @SunilPashikanti 5 @Michaelfp 2 @FLMike 5 @eduardo_izzo 2 Meekou 2 @rzuber 2 @Velegandla 2 @PowerPlatform-P 2 @Micaiah 2 Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27 Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8 SunilPashikanti8
On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners. The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights. Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.
We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for. We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer. Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together. Here's to new beginnings and endless possibilities! If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport. To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages