This topic contains 4 replies, has 0 voices, and was last updated by gabe17 6 years, 9 months ago.

  • Author
    Posts
  • #22582

    gabe17

    I'm having trouble with a saved search for bills, it's set to main line only for criteria.

    I want a formula field that displays links to all the attachments on the bill in one row.

    I'm trying to use:

    Code:
    NS_CONCAT(Case WHEN {file.name} IS NULL THEN NULL ELSE '<a href=https://' || 'system.na1.netsuite.com' ||{file.url}||' target="_blank"' || '>' || {file.name} || '</a>' END)

    But if a bill has 1 file attached, it repeats the same file 11 times.

    A similar formula for a saved search of a custom record works just fine

    Code:
    REPLACE(NS_CONCAT('<a href=https://' || 'system.na1.netsuite.com' ||{file.url}||' target="_blank"' || '>' || {file.name} || '</a>'),',','<br>')
    Any ideas what's making it do that specifically for bills?

    Thanks
    This is a cached copy. Click here to see the original post.

  • #22583

    POwen

    Not sure how much help I can offer but I've used NS_CONCAT() a couple of times and found that it only give results correctly when Summary grouped or something. It could be one of the search criteria that is making the results repeat. Just spit-balling, but multiple repeats on search results generally points to a criteria for me, in most cases anyway.

  • #22584

    pcutler

    Did you try adding criteria for MAIN LINE = YES?

  • #22585

    gabe17

    Yes, main line = YES and for summary I was using Maximum which worked okay in my custom record saves search using the similar formula.

  • #22586

    gabe17

    You guys were right, I was pulling in system notes for one of the results, so it was repeating the file for every system notes line. After adding the specific system note line I was after to the criteria, I got only one result. Thank you!

You must be logged in to reply to this topic.