I have two sharepoint lists:
1. Main Data called Lead_Data and
2. Lead_History.
I am trying to post a timestamp to lead history when I create a new record in Lead_Data. The new record in Lead_Data is created when I submit my form. I have created a label within my form to pull the date/time and I am attempting to patch this to my Lead_History table.
The key is I need this data to pull into my edit form so I can track the process history of the lead. I have it showing in a gallery in my edit form. I am hoping this makes sense.
Hi @KimberlyM ,
You can call the submit and right after that call the Collect (to create a new register) or Patch (to update an existing item) on the history list, and also use the last submited item as a value to this new one, simply using YourFormName.LastSubmitted property.
Is that what you are trying to accomplish?
@_douglasromao thank you for your response!
Maybe it helps to see my code.
I have highlighted my code in bright red as it is not happy. It is trying to tell me that my Patch statement has invalid arguments.
//SEND MAIL START ClearCollect(ccEmails,{Mail: LookUp(Agents, FullName = ndd_LeadMember1.Selected.FullName, EmailAddressCC)}); Collect(ccEmails,{Mail: LookUp(Agents, FullName = ndd_LeadMember2.Selected.FullName, EmailAddressCC)}); Collect(ccEmails,{Mail: LookUp(Agents, FullName = ndd_LeadMember3.Selected.FullName, EmailAddressCC)}); Collect(ccEmails,{Mail: LookUp(Agents, FullName = ndd_LeadMember4.Selected.FullName, EmailAddressCC)}); Office365.SendEmailV2(LookUp(Agents, FullName = ndd_AssignedTo.Selected.FullName, EmailAddressT), //Subject Line ndd_AssignedTo.SelectedText.Value & ", you have a new lead!", //Message Line "<strong>Name: </strong>" & ntxt_FirstName & " " & ntxt_LastName & "<br><strong>Email: </strong>" & ntxt_Email & "<br><strong>Phone: </strong>" & ntxt_Phone & "<br><strong>Address: </strong>" & ntxt_Unit & ", " & ntxt_Street & ", " & ntxt_City & ", " & ntxt_Province & "<br><strong>Listing Information: </strong>" & ndd_ListingType.Selected.Value & ", " & ndd_PropertyType.Selected.Value & ", " & ndd_Location.Selected.Value & "<br><strong>Source: </strong>" & ndd_Source.Selected.Value & "<br><br><i>Other Lead Members CC'ed: " & ndd_LeadMember1.Selected.FullName & ", " & ndd_LeadMember2.Selected.FullName & ", " & ndd_LeadMember3.Selected.FullName & ", " & ndd_LeadMember4.Selected.FullName & "</i>", {Cc: Concat(ccEmails,Mail,";")} ); //SUBMIT FORM AFTER THE OTHER PROCESSES SO THAT THE FORM DATA DOES NOT BECOME INVALID SubmitForm(NewForm); Patch(Lead_History, Lead_History.LastSubmitted, {Note: "New Lead Created", HistoryDate: "nDateTimeStamp"}); //NAVIGATE AND RESET THE NEW FORM Navigate( Dashboard, ScreenTransition.Fade ); ResetForm(NewForm);
I have also been attempting to get this to work on my edit form (see the screen cap below) and I am so confused and lost between these two pages and getting this to work - I am feeling super under pressure as my project is due tomorrow! I am sure if I can figure out one of these I will be able to get the other to work.
DateValue()
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
201 | |
71 | |
49 | |
43 | |
30 |
User | Count |
---|---|
253 | |
121 | |
86 | |
84 | |
84 |