How do I update a date field using a business rule?

Ryan157
Kilo Contributor

This is related to another post where I was asking how to create a report that will only show the last status report. The advise that I got from one expert user is to create a last_status_report field in the PM table then create a business rule that when "something" change then update the date to the status date. 

I'm hoping someone can guide me thru this process. I can't seem to figure out where my Business Rule is going wrong. 

 

1. Filter Conditions: When Status Date changes 

find_real_file.png

 

2. The field (in the project table) should get updated with the same date as the Status Date (as_on) field. 

find_real_file.png

 

Is there an easier way to do this to make it work? 

 

The last status date field is in the Project Table. I'm hoping when a new Status Report gets created the Business Rules fires off and updates the Last Status date field to be the same as the Status Date. 

1 ACCEPTED SOLUTION

ccajohnson
Kilo Sage

From what I can see your business rule is set to run on insert. If you are expecting the date to change, then you need to make sure that it also runs on Update.

Based upon your second screen shot, your action appears to be updating a field on the Project record and not the Status Report record. This may be why you cannot select the field you just used to trigger the business rule. Unfortunately, you may have to do a bit of coding to achieve this. Typically when we are updating a related record, we set the business rule to Trigger after Insert and Update. I do not currently have PPM installed, but my guess is that the project field name is project and your last status is called u_last_status. If you know what the names are, you can let us know so we can get the Project record through a script and update the Last status field on the Project from the Status date field on the current Status Report record. 

View solution in original post

7 REPLIES 7

ccajohnson
Kilo Sage

From what I can see your business rule is set to run on insert. If you are expecting the date to change, then you need to make sure that it also runs on Update.

Based upon your second screen shot, your action appears to be updating a field on the Project record and not the Status Report record. This may be why you cannot select the field you just used to trigger the business rule. Unfortunately, you may have to do a bit of coding to achieve this. Typically when we are updating a related record, we set the business rule to Trigger after Insert and Update. I do not currently have PPM installed, but my guess is that the project field name is project and your last status is called u_last_status. If you know what the names are, you can let us know so we can get the Project record through a script and update the Last status field on the Project from the Status date field on the current Status Report record. 

Project.last_status Status_report.as_on So if as_on is updated or changes the project.last_status should be updated.

Chavan AP
Tera Guru

i could see from the SS you have provided , you are trying on Insert instead of Update.

Just uncheck the insert checkbox and click on update on.

Chavan AP
[ Architect | Certified Professional]

Was this response helpful? If so, please mark it as ✅ Helpful and ✅ Accept as Solution to help others find answers.