Loading...

RE: options for Calculated Values in qListView fields

RE: options for Calculated Values in qListView fields

Home Forums QuickApps Forum options for Calculated Values in qListView fields RE: options for Calculated Values in qListView fields

#4998
Anonymous
Anonymous
Participant

Hi Kim,

   You need a javascript function that would get the first xxx chars from a field (see function DisplayChars below).

Feel free to improve/extend the function.

Then please place this function on a javascript file that is included in your page.

Then you create a calculated field on the qListView using ezEdit option and in the Calculated Value enter the following

<script> DisplayChars('<%FirstName%>',100);</script>.

This would do the work for you. Please see the screenshot/.

Any questions, please let me know.

If you consider that this answers your question please mark it so.

Thanks,

function DisplayChars(str, charNumber)

{

  if (charNumber < 0)

  {

    charNumber = 0;

  }

  var displayedStatus = str;

  if (typeof(displayedStatus) != 'undefined' && displayedStatus != null && displayedStatus.length > charNumber)

  {

    displayedStatus = str.substr(0, charNumber);

  }

  return displayedStatus;

}

CommunityJSfile.png