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
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
Dean Haddock
http://systemsconsciousness.com
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.
Dean Haddock
http://systemsconsciousness.com
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.
Dean Haddock
http://systemsconsciousness.com
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
Dean Haddock
http://systemsconsciousness.com
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:
with this code: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}
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}
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks