Hello.
My app connected with SharePoint list. And I want to make a button in ItemDetails screen which will send email to person who create an item in this list. I am trying to use Office365Outlook.SendEmail function, but it returns an error that created by is a text, not email. How I may get Email of person who create an item to put this email in my function?
Office365Outlook.SendEmail(
DataCardValue17,
"Subject",
"EmailBody"
);
Solved! Go to Solution.
Hi @ppl ,
You can use
ThisItem.'Created By'.Email
to reference the person who created it from within the gallery or form OR
YourGalleryName.Selected.'Created By'.Email
If selected from a gallery.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@ppl ,
Sorry, danger of free-typing - code should be
If(
!IsBlank(
Param("ItemId")
),
Set(
vID,
Value(Param("ItemId"))
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
You'll need to dig a layer deeper into the DataCardValue17 control, to access the property which has the value shown. This will vary from control to control - like .Value, .Text, .SelectedItem, etc.
In your case, if that's a Text column, then trying appending .Text
Office365Outlook.SendEmail(
DataCardValue17.Text,
"Subject",
"EmailBody"
);
These are often referred to as control Core Properties, BTW.
Hi @ppl ,
You can use
ThisItem.'Created By'.Email
to reference the person who created it from within the gallery or form OR
YourGalleryName.Selected.'Created By'.Email
If selected from a gallery.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thank you very much!
It works
GalleryName.Selected.'Created By'.Email
I accepted solution too fast.
It has some problems) there is no errors, but it sending email not to Created By person. Email is sending to person who editing item now and press this button.
@ppl ,
Very strange - I just put a label in a gallery with ThisItem.'Created By'.Email and got all the correct email addresses.
You should be getting the correct result as this function is designed to give this information.
Are you following this exact syntax?
No, I have used
GalleryName.Selected.'Created By'.Email
If I use ThisItem.'Created By'.Email I get an error
@ppl ,
That is why I gave you the two syntaxes. ThisItem will only work inside a form or a gallery (when you can refer directly to the chosen record.
Try putting a label in any card in your record with this syntax and I believe you should receive the correct information.
But it is right in DetailScreen Form. It is the screen when I get after I choose an item from the gallery.
@ppl ,
I can guarantee you it may be ON the form (in its placement on the screen), but it is not IN the form as being inserted into one of the DataCards). Unlock a card, highlight it and insert a button. Make sure after this it cannot move outside the card and then put the code in - it will work.
User | Count |
---|---|
259 | |
108 | |
95 | |
57 | |
40 |