cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
davidessex
Helper II
Helper II

Multi Operational Button

Hi

 

I have created an app to hold our applications in, and can record our interview data with. I have then created a button which when pressed emails selected data from the application / interview to the enrolment team. That works. However I want the button to also add the current date into a date picker to so it shows when the button was pushed so people know it was sent to the enrolment team.

 

This is my current situation:

 

The Enrol Learner button is on a data card set within the form. 

 

davidessex_0-1654505571543.png

 

The existing code in the OnSelect for the button is

 

Office365Outlook.SendEmailV2(
"email address@email address.com",
" New Enrolment " & ThisItem.'Course to Enrol Onto 21/22'.Value,
"<font size=12>Programme Offer Form</font><br>" & "<br>" & "<font size=4><b>Learner Name: </b>" & ThisItem.Name & "<br>" & "<br><b>TERMS ID: </b>" & ThisItem.'TERMS Learner Code' & "<br>" & "<br><b>Course to Enrol Onto: </b>" & ThisItem.'Course to Enrol Onto 21/22'.Value & "<br>" & "<br><b>Start Date: </b>" & ThisItem.'Start Date' & "<br>" & "<br><b>Planned End Date: </b>" & ThisItem.'Planned End Date' & "<br>" & "<br><b>Initial Assessment Level: </b>" & ThisItem.'Learners IA Level' & "<br>" & "<br><b>Employment Status: </b>" & ThisItem.'What is Your Employment Status'.Value & "<br>" & "<br><b>If Employed, How Many Hours a Week? </b>" & ThisItem.'If you are employed or self employed hour many hours a week do you work:'.Value & "<br>" & "<br><b>Do the earn less than £17,374? </b>" & ThisItem.'Do you earn less than £17,374 ?' & "<br>" & "<br><b>If Unemployed, ar you currently loking for work? </b>" & ThisItem.'Are you currently looking for work (if unemployed)' & "<br>" & "<br><b>Are you in receipt of any State Benefits? </b>" & ThisItem.'Are you in receipt of any state benefit?' & "<br>" & "<br><b>Benefits being Claimed: </b>" & ThisItem.'I can confirm that I receive the following benefits:' & "<br>" & "<br><b>Are you released on temporary licence, studying outside a prison enviroment, and is not funded by the Ministry of Justice? </b>" & ThisItem.'Are you released on temporary licence, studying outside a prison environment, and it is not funded by the Ministry of Justice?' & "<br>" & "<br><b>Date of Assessment: </b>" & ThisItem.'Date of Assessment Interview' & "<br>" & "<br><b>Assessment Completed by: </b>" & ThisItem.'Assessment completed by' & "<br>" & "<br><b>Proof of Photo ID seen: </b>" & ThisItem.'Proof of Photo ID seen'.Value & "<br>" & "<br><b>Additional Proof of Photo ID seen: </b>" & ThisItem.'Additional Proof of ID seen'.Value & "<br>" & "<br><b>Confirm what evidence of Residency seen: </b>" & ThisItem.'Confirm What evidence of Residency seen'.Value & "<br>" & "<br><b>Additional evidence of Residency seen: </b>" & ThisItem.'Additional evidence of Residency seen'.Value & "<br>" & "<br><b>Further evidence of Residency seen: </b>" & ThisItem.'Further evidence of Residency seen'.Value & "<br>" & "<br><b>IQA Name </b>" & ThisItem.'IQA Name'
)

 

I have looked everywhere on the internet and I cannot find anywhere how to do this - all I can find is having a button within the  datacard where the date is held which I tried to adapt but all that happened was when I pressed the Enrol Learner button was gett an email saying TRUE!. The date picker in my app that would have the date added to is Date Forwarded.

 

Thanks

14 REPLIES 14

Screen shot (without submitform command in button)

davidessex_0-1654593362295.png

 

Okay  @davidessex ,

Follow these steps:

 

1. From the screen  where you click to navigate to LOMT L2 Detail,  add this Set(LearnerDetails, ThisItem) on the OnSelect of that gallery before it navigate to this screen.

2. On you button add:

Patch(DataSource, LookUp(DataSource, ID=LearnerDetails.ID), {DateForwarded:Now()})

 Let me know if it helps.

Hi, Done as you said:

davidessex_0-1654596356165.png

I have added the code as such - 

 

Patch(DataSource, LookUp(DataSource, ID=LearnerDetails.ID), {DateForwarded:Now()});
Office365Outlook.SendEmailV2(
"david.harvey@essex.gov.uk",
" New Enrolment " & ThisItem.CoursetoEnrolOnto21_x002f_22.Value,
"<font size=12>Programme Offer Form</font><br>" & "<br>" & "<font size=4><b>Learner Name: </b>" & ThisItem.'{Name}'
& "<br>"& "<br><b>TERMS ID: </b>" & ThisItem.TERMSLearnerCode
& "<br>" & "<br><b>Course to Enrol Onto: </b>" & ThisItem.CoursetoEnrolOnto21_x002f_22.Value
& "<br>" & "<br><b>Start Date: </b>" & ThisItem.StartDate
& "<br>" & "<br><b>Planned End Date: </b>" & ThisItem.PlannedEndDate
& "<br>" & "<br><b>Funding Stream: </b>" &ThisItem.FundingStream.Value
& "<br>" & "<br><b>Initial Assessment Level: </b>" & ThisItem.LearnersIALevel
& "<br>" & "<br><b>Employment Status: </b>" & ThisItem.WhatisYourEmploymentStatus.Value
& "<br>" & "<br><b>If Employed, How Many Hours a Week? </b>" & ThisItem.Ifyouareemployedorselfemployedho.Value
& "<br>" & "<br><b>Do the earn less than £17,374? </b>" & ThisItem.Doyouearnlessthan_x00a3_17_x002c & "<br>" & "<br><b>If Unemployed, ar you currently loking for work? </b>" & ThisItem.Areyoucurrentlylookingforwork_x0 & "<br>" & "<br><b>Are you in receipt of any State Benefits? </b>" & ThisItem.Areyouinreceiptofanystatebenefit & "<br>" & "<br><b>Benefits being Claimed: </b>" & ThisItem.IcanconfirmthatIreceivethefollow & "<br>" & "<br><b>Are you released on temporary licence, studying outside a prison enviroment, and is not funded by the Ministry of Justice? </b>" & ThisItem.Areyoureleasedontemporarylicence & "<br>" & "<br><b>Date of Assessment: </b>" & ThisItem.DateofAssessmentInterview & "<br>" & "<br><b>Assessment Completed by: </b>" & ThisItem.Assessmentcompletedby & "<br>" & "<br><b>Proof of Photo ID seen: </b>" & ThisItem.ProofofPhotoID.Value & "<br>" & "<br><b>Additional Proof of Photo ID seen: </b>" & ThisItem.AdditionalProofofIDseen.Value & "<br>" & "<br><b>Confirm what evidence of Residency seen: </b>" & ThisItem.Confirm_x0020_What_x0020_evidenc.Value & "<br>" & "<br><b>Additional evidence of Residency seen: </b>" & ThisItem.AdditionalevidenceofResidencysee.Value & "<br>" & "<br><b>Further evidence of Residency seen: </b>" & ThisItem.FurtherevidenceofResidencyseen.Value & "<br>" & "<br><b>IQA Name </b>" & ThisItem.IQAName;
)

And I still get the X

davidessex_1-1654596478266.png

 

I am sorry for keep asking but Powerapps is so different to what I have done in the past I am pulling my hair out

 

 

 

Tchesco
Resolver I
Resolver I

You need to change the "DataSource" to your own database

davidessex
Helper II
Helper II

Hi. Found out why it wont work properly - the main form is in detail mode, so even though the date datacard is in edit mode it won't allow submitform to work!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,916)