Issue with monthly sales quotas

Hello,

On a system I’m building, I need to be able to set and query monthly quotas for sales people.

I’m using a table that has an id, a date (I don’t care about the day, just month and year) and the sales person foreign key.

My issues with building the interface for this are:

  • In the datepicker control, I can’t get rid of days (I’d like to select just month and year, but I’m using a full date to be able to report quota attainment based on sales dates).
  • I currently have the datepicker as it is, and I’m trying to change the date of new quotas to the 15th of the month to prevent duplicates… I’m using this “Execute Code” without success: ${event.month} = new Date(${event.month.getFullYear()}, ${event.month.getMonth()}, 15)
    • ${event.month} does contain the selected date.

Ideas for this?

Thanks!

Hi @fjcf,

You would need to use Set Property as you shouldn't be trying to assign to the event argument. Also the ${event} of the DatePicker component is the Date object - it doesn't have a month field.

So your code should be something like this:

The Value is set to: new Date(${event.getFullYear()}, ${event.getMonth()}, 15)

Thanks for helping.
Month is the name of the date column (the row I'm creating has ID, Date (named Month) and Salesperson).
The ${event} I'm trying to modify is not of the datepicket (I don't know how I would have access to it in a CRUD Add form) but the submit of the form..
I can see that ${event.month} contains the entered date by using a Notify event.
So I believe that questions would be:
1 - Is this a good approach to monthly sales cuotas?
2 - Can the datepicker be modified to request only month and year?
3 - How would I change the day to be always the 15th in the submittion form?

Also, since you are a member of the Radzen team: I own a ppro license.. is this the official support channel?

Thanks again

1 - Is this a good approach to monthly sales cuotas?

I don't really know as I don't understand what monthly sales cuotas is.

2 - Can the datepicker be modified to request only month and year?

No. The Datepicker can pick dates only.

3 - How would I change the day to be always the 15th in the submittion form?

If your original code was used before invoking the data source method which creates the item it should have worked. Can you show us a screenshot of your Submit event handler from Radzen?

Also, since you are a member of the Radzen team: I own a ppro license.. is this the official support channel?

The Radzen forum is one of the official channels to get support. The for dedicated support you can send emails to info@radzen.com.

Hello,

For anybody searching, this is a very good answer and can be implemented in Radzed: https://stackoverflow.com/questions/4409003/storing-weekly-targets-in-database