List View (Refresh) live Status

Status
Not open for further replies.

keith21

Member
Hi All
I am not sure if this is possible in fabrik but any ideas would be welcome.

I have a Record Age that is using a Calc element that looks up a date time stamp and calculates how many days the record is been open for, works fine.

What I am trying to achieve is to give me real time status as soon as I click on the list view. At the moment I have to click on the record to find out if it is RED, AMBER or GREEN.

Is there any way I can get it to refresh by itself, and show RED, AMBER or GREEN on list view?
I have a screen print of what it looks like at the moment.
 

Attachments

  • Untitled.png
    Untitled.png
    30.5 KB · Views: 166
Not sure what you mean.
Your image IS showing the record age in list view, isn't it?
 
yes the record age is in list view, I want it to change on page load.
Its a calculation off how long the record has been open. On page load the record age should change to Red, Amber or Green. At the moment I am using CCS to display the colours.
 
Surely if you have your calc set with "Only calc on save" set to No, then the calc should re-run when the list is displayed, and hence show the current status?

-- hugh
 
Hi Hugh
I have done "Only calc on save" set to No, although I think it might have a bug in it. It shows the wrong status on each record but when I click on the record it is correct on the form view. The other thing that I noticed is that when I create a new record it does not show any red, amber or green on the list view although in database I see values. So I set "Only calc on save" set to Yes, and I can now see the status although it not live status.

Image 1 = "Only calc on save" set to No,
Image 2 = "Only calc on save" set to yes

You can see from the images the problem I am facing.


Thanks

Keith
 

Attachments

  • Image 1.png
    Image 1.png
    50.2 KB · Views: 179
  • Image 2.png
    Image 2.png
    49.9 KB · Views: 180
I'll need to look at your site to understand what you are trying to do.

Fill out your My Sites, and give me any info I need (which list, element etc).

-- hugh
 
Hi Hugh
for some reason its says this under sites "No sites set up yet, or you do not have permission to view this content."

Thanks
 
Hi
I have put my site details up.
Under Operations menu tab click on Service user data collection. you will see the list for SUDC.
I am having a problem with Record Age. I want to show a live overview off the status, its a calc element. I have set "Only calc on save" set to No, although it does not work as it should do. When I turn it off it displays the correct results although its not a live status off the record age.

Thanks
once again.
 
You have set the Record Age to "only calc on save"=yes
So the list is taking the value stored in the DB and this value is stored in the moment the record is saved.
If you are calculating with something like "now" this doesn't make sense.
 
Hi

If I set "only calc on save"=no, it does not show the correct results. I do want to do this to show live status but it?s not working correctly. why??

It only work properly when set to "yes" and shows the correct results. What I don?t understand is why it does not work when set to "No".


I am using "NOW" to get now time.

If I could do it any better would appreciate the help, to get this live status thing working.



Code:
$Date = '{sudc___ICDTS}';
$jDate = strtotime($Date);
$now = time("NOW");
$in7days = strtotime('+7 days',$jDate);
$in14days =strtotime('+14 days',$jDate);

$status= "Green";
if ($now > $in7days) {$status= "Amber";}
if($now > $in14days) {$status="Red";}


return $status;
 
I could replicate with your code (copy/past to local) - and it's TOTALLY strange. There must be some strange character inside
{$status="Red";}

Delete and retype it and try again.
And better don't use common variable names like $now, $Date, $status, it may conflict with Fabrik variables (not the case here, but may be in other situations)
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top