[SOLVED] Pass value on Progress field % completion

1 year 8 months ago - 1 year 8 months ago #330480 by galanopd
I have an INT field and I need it to get value 1 when a progress fiels is >=50% else 0
I have added in CBCodeField
[cb:if cb_progressfield="50%"]1[cb:else]0[/cb:else][/cb:if]
but it doesn't seem to work.
The INT field has min 0 and max 1. Step is 1. Also Ajax enabled.
How can I implement this?

Please Log in to join the conversation.

1 year 8 months ago #330481 by krileon
Replied by krileon on topic Pass value on Progress field % completion
Progress fields raw value is returned as a value from 0-100 which represents the % complete. Your IF substitution should work by simply removing the "%" from your condition. You shouldn't need a code field for this either as a simple Custom HTML field will render with substitutions parsed.


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 to join the conversation.

1 year 8 months ago - 1 year 8 months ago #330482 by galanopd
Replied by galanopd on topic Pass value on Progress field % completion
INT field didn't work no matter what I tried.
HTML Custom field works just fine.

Thanks

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.176 seconds

Facebook Twitter LinkedIn