1. Heinz-R
  2. RO CSVI
  3. Saturday, 14 June 2025
  4.  Subscribe via email
Using RO CSVI to export some user based custom fields I should build an additional field based on the birthday which is called "unter30" when the person is not yet 30 years old. This should be like the Excel formula:
'=IF(DATEDIF("custom field birthday"; TODAY(); "y";)<30;"X";"";)

Would this be possible within an export template?

Thanks
Heinz
Accepted Answer
Accepted Answer Pending Moderation
Hello Heinz,
With current RO CSVI rules it is not possible to have any formula processing in export but you can write your own rule plugin and code this formula in the rule. The way I see this new rule is that

1. Create custom export field and set Column header as unter30 .
2. Use RO CSVI copy rule plugin and copy custom field birthday to unter30 export field
3. Create a new RO CSVI rule plugin with the given formula and process it with the copied custom field birthday value and get the new value on the field.

Try and let me know if it helps.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer Pending Moderation
Only a first feedback:
Thanks a lot for your answer. But be aware that in your example (https://rolandd.com/documentation/ro-csvi/field-copy-plugin) the four pictures for the example are not displayed - the borders are there but the content I'm missing (at least with my firefox browser).

Heinz
  1. one week ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello Heinz,
Thank you for pointing it out. I see the issue happens with Firefox browser though the images load in Google Chrome. We will check on why images do not load in Firefox and in the meantime you can use Chrome or any other browser to read the article.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. one week ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hi Tharuna

Thanks for the feedback. Works great with another browser (but hopefully also with the Firefox browser in the near future) :)

I have evaluated the options to cover my requirements and there may be another way that is easier to implement:
In the Joomla DB I have a custom field with the date of birth. I need this data, but additionally I would like to have a copy of this field with the date “Date of birth + 30 years”. This would allow me to easily create the required statistics.

Can I use a field-copy-plugin to create this additional field and then use a rule-plugin to perform the calculation according to the SQL formula "DATE_ADD(datefield, INTERVAL 30 YEAR)"?

I hope I have expressed myself clearly and would be very grateful for any feedback.

Best regards
Heinz
  1. one week ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello Heinz,
Can I use a field-copy-plugin to create this additional field and then use a rule-plugin to perform the calculation according to the SQL formula "DATE_ADD(datefield, INTERVAL 30 YEAR)"?

Yes you can do that. Only thing is that you need to keep the order of rule like Field copy rule is applied first and then custom rule plugin. That way when custom rule plugin gets value Field copy rule has been already applied.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. one week ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Tharuna

I'm probably too stupid to grasp the formula correctly. I've tried several ways, but I can't manage to calculate with the field content. I'm sorry that I have to ask again how the formula should be mapped correctly.

Please find attached the pictures of my fields and the rules.

Thank you very much for your patience and support!
Heinz
Attachments (3)
  1. one week ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,
Looks like there has been a misunderstanding with rules. The order I mentioned in my previous reply is for custom rule plugin. RO CSVI Conditional rule cannot do any calculated values. You still need to write a custom rule for the formula. Please read through document Writing a rule plugin to write a new custom rule plugin.


but hopefully also with the Firefox browser in the near future

This has been fixed.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. one week ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Thanks again Tharuna!

I understand that the only way is the one you described. And I will probably have to go through it if the solution is to be built like this.

In this context, please allow me one last question regarding the possibilities:
The “Value” field in the rules cannot be calculated either? With the attached figure I would have the required results in the export, but the date “1995-06-26” is of course already calculated individually from ‘TODAY() - 30 years’.

In Excel I would do this with the formula:
=DATE(YEAR(TODAY()) - 30; MONTH(TODAY()); DAY(TODAY()))
And the way with a formula would of course be the most elegant solution.

But either way: thanks again for the great support.

Greetings
Heinz
Attachments (1)
  1. one week ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello,
In this context, please allow me one last question regarding the possibilities:
The “Value” field in the rules cannot be calculated either? With the attached figure I would have the required results in the export, but the date “1995-06-26” is of course already calculated individually from ‘TODAY() - 30 years’.

If you are asking about the check if Greater than date 1995-06-26 then that condition will work and in the export file all dates matching this condition will be replaced by X as set in your rule. Please try it and check.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. one week ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hi Tharuna

I'm absolutely with you: it works with "Greater than date 1995-06-26".

The question was if it THERE also would be working with placeholders like 'TODAY()'.

Regards
Heinz
  1. one week ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello Heinz,
The question was if it THERE also would be working with placeholders like 'TODAY()'.

No that won't work. We have only value checks in conditional rule plugin so if you enter the date value then check will work but not with placeholders.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. 5 days ago
  2. RO CSVI
  3. # 10
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!