How to setup Reminder Notification for Calculated?

Hello…

I was making app for marketing division, It’s call Order Management. At some point time I need to make a calculated for the due date to each process. 

When I want to setup the reminder for each due date, the fields didn’t show up because seems like reminder can only works for fields with date/date & time  attributes.

I’ve been thinking it’s maybe because the due date value is date but it’s actually calculated, so it can’t be use for reminder.

 

 

Is there any way to solve it without custom from JavaScript? or it’s required customize with JS?

 

You are right that the reminder notification requires a date or time field. If you use a text field to calculate the due date, the reminder can not be set up properly per the information on the link below.

https://jp.cybozu.help/en/k/user/notification

 

If you need to set up a reminder notification with the calculated date field using a text field, you need to customize with JS.

By placing a date field as a reminder notification, you can set up a reminder by copying the calculated result field to the added date field as below.

  kintone.events.on("app.record.create.submit", function(e) {




  e.record.change_date.value = e.record.due_date.value;


  return e;


  });

 

The above coding is that when you save the record, the value set up in 

“due_date” field will copy to “change_date” field as a reminder notification.

 

As another option, you can process the calculation itself with JS. In this case, you do not need to add the new field as a reminder notification.

 

Hope it helps.

 

Thanks.

 

Junko

 

Hi Junko,

Thank you for your help, I’ll try it from custom JS.

Thanks,
Yosafat

Hi Junko,

Thank you for your help, I can fill in all notification fields from custom JS now.

I found other problem, when I import new records from excel/csv, all the notification fields didn’t fill in. Is there any function to accommodate it? (seems like app.record.create not working for import records from excel/csv).

 

Hi Yosafat,

 

As you are aware, the previous JS coding does not work for CSV loading because it uses “Save Submit (when pressing save button)” event with “app.record.create.submit”. Unfortunately, there is no event during the CSV file import.

As a reference, the different kind of events is listed below.

 

▼ Event Handling

https://developer.kintone.io/hc/en-us/articles/212494948/

As alternative options, I would suggest creating another CSV file that has the value for the blank field,  “notification” field,  or you rewrite the code in kintone REST API.

What you can do with REST API is, at first,  to place a button to update the record in a batch on the record list screen and after importing, you can press the button. Once the button is pressed, the record is obtained and updated.

You might want to retrieve details of multiple records with blank “notification” fields using a query string. And you can update those records by assigning the value of “notification” field from “due_date” field.

The following links explain how to get and update records.

▼ Get Record (GET)

https://developer.kintone.io/hc/en-us/articles/213149287/

▼ Update Record (PUT) https://developer.kintone.io/hc/en-us/articles/213149027/

Thanks.

Junko

 

Hi Junko,

Thank you very much for your help. I will try work with REST API.

Thanks,
Yosafat

Hi Junko,

Thank you for your help, It’s all working now.

I have another question. I notice that Reminder Notifications is up to 10 notification triggers. Is there any others way to increasing the limit to 15 or 20 without custom from JS?

Thanks
Yosafat

Hello Yosafat!

Unfortunately, you cannot increase the limit of Reminder Notification triggers, even with the JS since there is no way to edit the Reminder Notification settings page

May I ask what you are trying to do here?

Hi Junko,

 

I was creating a manufacturing monitoring app and I was using reminder notification to send notification to user which is in charge to make the part type.

The manufacturing have 15 process (including star date), and for each process, notification will be send 1 day before the process date. 

Do you have any sugesstion about it? (I attached screenshot of the app).

 

 

Thanks,

Yosafat

 

 

Hello Yosafat,

By using a table, you can try the followings:

1) If it is possible to change the form of your app, you can make all the process dates as a table and set the reminder notification on that table. It does not require JS, but it seems to affect the customization of the current app.

2) If you want to keep the fields as they are now, you can add new table to store the process dates and set the reminder notification on that table. However, the app will look messy if you do not hide the table.

Please refer to the following links for details.
https://get.kintone.help/hc/en-us/articles/115001230768-How-to-Create-a-Table
https://get.kintone.help/hc/en-us/articles/115001510748-Configuring-App-Notifications

hope this helps.

Yasu

Hi Yasu,

 

Thank you very much for your advice, I’ll think bout it and try to implement by using table.

 

 

Thanks,

Yosafat