How to get created by field value?

Hi,

I used Plumsail form for SharePoint Online. Now, I want to get value of “Created By” column to check for somethings

I tried used fd.field(“Author”).value() to get value. But it is return undefined value.

Please help me for this case.

Thanks.

Hi!

You can find all field values including system ones in the following property:
fd.spFormCtx.ListData

Please, note that the property is available only after rendering the SharePoint form, so use it in fd.spRendered event handler.

Thank you so much.

Dat

how to get just the email or display name form author
var Author=fd.spFormCtx.ListData.Author; //this code returns all the property but i need just email

@ShantiBhattarai,

Please use the following code to get the Name and Email of the Author.

fd.spRendered(function() {
        var authorString = fd.spFormCtx.ListData.Author;
        var authorSplit = authorString.split(',#');
        
        //get Author Dispaly Name
        var authorName = authorSplit[authorSplit.length - 1];
        //get Author Email
        var authorEmail =  authorSplit[authorSplit.length - 3];
});
1 Like