get rid of extra strings in full name

評論

2 條評論

  • Avatar
    sysberry GmbH

    Hi Anil,

    you can get the variable in JS with this: 

    https://documentation.agilepoint.com/00/appbuilder/cloudjsGetFieldValue.html

    then modify it 

    var FullName = result.data.split(" ")[0]+" "+ result.data.split(" ")[1]; //put Lastname and Firstname together

    and then put to the control you want with this:

    https://documentation.agilepoint.com/00/appbuilder/cloudjsSetFieldValue.html

    Feel free to ask further questions!

    Regards,

    Alexey

    0
    評論操作 永久連結
  • Avatar
    B Anilreddy

    Thanks Alexey,

    I used below JS code to log the field value into the console but it seems didn't worked. It's logging empty data object. Please let me know if I am missing anything in here.

    var options = {};
    options.fieldId = 'UserName'; // individual control
    eFormHelper.getFieldValue (options, function (result)
    {
    if (result.isSuccess) //check if is success
    {
    console.log(result.data); //logs the data holds the found control's value
    }
    else
    {
    console.log(result.error); //logs the error
    }
    });

    0
    評論操作 永久連結

登入寫評論。