Skip to main content

I would like to show the created by field on my form and I cant seem to find it anywhere!

It will be hidden in edit and new mode. this way the approvers can view the form and see who created it even though it also says this in the workflow notification. confused.png

Can anyone tell me where it is...

Thanks

Kassie

you could add a calculated value control to your form and set the formula builder to be item property - created by?


I tried that with no luck... the return was Value1! or something like that.

I did have success adding a rich text field and inserting Created by as a reference. Thanks for the help with getting me to think outside the box! happy.png

Kassie


ah cool - have to say I didn't try it before I suggested it ooops


I may have done it wrong. I'm new to forms. :-/


Hello Kassie,

Use calculated column column on Nintex Forms and put CreatedBy item property in the formula section.

Also change Recalculate formula on view mode to Yes.

This way, you can see the created by person name on View and Edit mode.


Hi,

If you add a single line text control with the following settings:

185331_pastedImage_1.png

Then paste the following in the Custom JavaScript it should work.

NWF.FormFiller.Events.RegisterAfterReady(function () {
   
    function getUserById(id) {
        var mypersonurl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/GetUserById(" + id + ")";

        var calluser = NWF$.ajax({
            url: mypersonurl,
            type: "GET",
            dataType: "json",
            headers: { Accept: "application/json;odata=verbose" }
        });

        calluser.done(function (data, textStatus, jqXHR) {
            var authorname = data.d.Title;
            NWF$("#" + txtCreatedBy).val(authorname);
        });
    };

    function getUrlVars() {
        var vars = a],
            hash;
        var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
        for (var i = 0; i < hashes.length; i++) {
            hash = hashes.split('=');
            vars.push(hash)0]);
            vars(hashi0]] = hasht1];
        }
        return vars;
    };

    var itemid = getUrlVars()Â"ID"];
    var myurl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getById('" + _spPageContextInfo.pageListId + "')/items(" + itemid + ")";

    var call = NWF$.ajax({
        url: myurl,
        type: "GET",
        dataType: "json",
        headers: { Accept: "application/json;odata=verbose" }
    });

    call.done(function (data, textStatus, jqXHR) {
        var author = data.d.AuthorId;
        getUserById(author);
    });
});

Jan


Reply