Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] cb:if against added fields?

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
8 years 4 months ago - 8 years 4 months ago #282542 by ThePiston
[SOLVED] cb:if against added fields? was created by ThePiston
RE: www.joomlapolis.com/forum/153-professional-member-support/225833-solved-question-about-complex-cbif-statements

is it possible to use the + operator like this?

[cb:if cb_2016llf+cb_2016vopac>="1500"]

[MOD EDIT]: Please do not bump old topics. Anything older than 6 months please simply link to it if you feel it is relevant in a new topic.

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Last edit: 8 years 4 months ago by krileon. Reason: Added [SOLVED] tag to subject

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 4 months ago #282545 by krileon
Replied by krileon on topic cb:if against added fields?
No, you will need to do your math in the field it self. So for example in a Code or Query field then condition against that. CB Auto Actions is the first to introduce format functions, but they can be heavy so it needs further improvement before we could bring something like that to core CB.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
8 years 4 months ago #282559 by ThePiston
Replied by ThePiston on topic cb:if against added fields?
something like this in the query field?
SELECT SUM( `cb_2016vopac` + `cb_2016llf` ) FROM `#__comprofiler`

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 4 months ago #282607 by krileon
Replied by krileon on topic cb:if against added fields?
Yes, but i'd save your self a query and simply do it with PHP in a Code field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
8 years 4 months ago #282613 by ThePiston
Replied by ThePiston on topic cb:if against added fields?
yes, I just used sourcerer in a module and works fine, thanks

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum