Code field and combi with auto action

8 years 3 weeks ago #280802 by edmundcheong
Code field and combi with auto action was created by edmundcheong
I am just checking if info generated by a code field type could be copied to another text field type using auto action type to update a field?

Please Log in to join the conversation.

8 years 3 weeks ago #280817 by krileon
Replied by krileon on topic Code field and combi with auto action
Why would you want to copy a code field to a text field? What are you trying to accomplish exactly? Seams like a waste for double storage, but to answer your question yes it can be done with a Field action by substituting in the 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 to join the conversation.

8 years 3 weeks ago #280823 by edmundcheong
Replied by edmundcheong on topic Code field and combi with auto action
I am trying to use the code fieldtype to get a value from oracle.. example cb_code below:
$conn = oci_connect('hr', 'welcome', 'localhost/XE');
if (!$conn) {
    $e = oci_error();
    trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}

$stid = oci_parse($conn, 'SELECT * FROM employees');
oci_execute($stid);

echo "<table border='1'>\n";
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
    echo "<tr>\n";
    foreach ($row as $item) {
        echo "    <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : "&nbsp;") . "</td>\n";
    }
    echo "</tr>\n";
}
echo "</table>\n";

I will do an auto action to be copy the field into a text field.. i would like to copy the value and store it in the cb fields to do some calculations..

Please Log in to join the conversation.

8 years 3 weeks ago #280831 by krileon
Replied by krileon on topic Code field and combi with auto action
Looks like you could use a Query field to query for that information instead of a code field. A query action could also be used to push the value to a CB field if you still need storage. If you still want to use the code field then yes you could store it to a field using a field action and substituting in the 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 to join the conversation.

8 years 3 weeks ago #280845 by edmundcheong
Replied by edmundcheong on topic Code field and combi with auto action

krileon wrote: Looks like you could use a Query field to query for that information instead of a code field. A query action could also be used to push the value to a CB field if you still need storage. If you still want to use the code field then yes you could store it to a field using a field action and substituting in the code field.


The query field could connect to Oracle? :woohoo:

Please Log in to join the conversation.

8 years 3 weeks ago #280847 by lousyfool
Replied by lousyfool on topic Code field and combi with auto action

edmundcheong wrote: The query field could connect to Oracle? :woohoo:


In a query field's back end > Parameters > Query you'll see an option "Mode". Setting it to "External" and filling in the blanks should do, no?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.252 seconds

Facebook Twitter LinkedIn