Results 1 to 5 of 5

Thread: Multienum field value is "Array" in dashlet view, nowhere else

  1. #1
    criticalmath's Avatar
    criticalmath is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Earth, Milky Way
    Posts
    47

    Default Multienum field value is "Array" in dashlet view, nowhere else

    This is a strange one. I've attached a screenshot.

    I have a few multienum fields that work fine in all other views, but in the dashlets they show up as "Array".

    Anyone seen this before? Is there any way I can fix this?

    Thanks,

    Dean
    Attached Images Attached Images  

  2. #2
    criticalmath's Avatar
    criticalmath is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Earth, Milky Way
    Posts
    47

    Question Re: Multienum field value is "Array" in dashlet view, nowhere else

    Update: This problem is in our Opportunities module. I added the same fields as the ones giving the "Array" value on the dashlet to the Leads module, and now NEW records are appearing correctly. The old ones however still say "Array."

    I've gone back and edited/changed the values on the ones that still say Array, and they are still wrong on the dashlet. The strange thing is they are all correct on the list, edit and detail views.

    Anyone else had this problem? I'm on Sugar 5.2.0k.

  3. #3
    criticalmath's Avatar
    criticalmath is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Earth, Milky Way
    Posts
    47

    Cool Re: Multienum field value is "Array" in dashlet view, nowhere else

    It appears that this is caused when a "blank" field value is present in the multienum data type.

    Since the multienum values are not selected by default, there is no need for a blank value to be included in the multienum list.

    This could probably be considered a bug.

  4. #4
    criticalmath's Avatar
    criticalmath is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Earth, Milky Way
    Posts
    47

    Cool Re: Multienum field value is "Array" in dashlet view, nowhere else

    thanks for everyone who helped me solve this! (i.e., ME.)

    this appears to be a bug, but i'm not exactly sure where the bug lies. it could be in several places. but this at least fixes the dashlets issue. dig it:

    in include\Dashlets\DashletGenericDisplay.tpl on line 177 or so, there is a bit of smarty code that looks like this:

    {sugar_translate label=$params.options select=$item}

    change it to this:

    {sugar_translate label=$params.options select=$item|replace:'^':''}

    the "Array" values will then be correct.

    <3

  5. #5
    imran123 is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    132

    Default Re: Multienum field value is "Array" in dashlet view, nowhere else

    Maybe you solved it..but heres what sugar technical support replied to my query with the following fix:


    Replace the following code in function process() in include/Dashlets/DashletGenericDisplay.tpl:
    PHP Code:
    {if !empty($rowData.$col)}
    {
    counter name="oCount" assign="oCount" start=0}
    {
    assign var="vals" value='^,^'|explode:$rowData.$col}
    {foreach 
    from=$vals item=item}
    {
    counter name="oCount"}
    {
    sugar_translate label=$params.options select=$item}{if $oCount != count($vals)},{/if}
    {/foreach}
    {/if} 
    with this code:
    PHP Code:
    {if $rowData.$col != "" }
    {
    counter name="oCount" assign="oCount" start=0}
    {
    multienum_to_array string=$rowData.$col assign="vals"}
    {foreach 
    from=$vals item=item}
    {
    counter name="oCount"}
    {
    sugar_translate label=$params.options select=$item}{if $oCount != count($vals)},{/if}
    {/foreach}
    {/if} 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 2010-02-26, 04:26 PM
  2. Replies: 0
    Last Post: 2007-07-27, 08:13 AM
  3. Replies: 2
    Last Post: 2006-12-15, 03:00 PM
  4. Replies: 0
    Last Post: 2006-08-17, 05:59 PM
  5. Replies: 3
    Last Post: 2006-07-25, 06:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •