Jump to content

clicknip

Members
  • Posts

    4
  • Joined

  • Last visited

clicknip's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks for you comment and the heads up, ShWolf. Once I got the API setup working (a little tricky, since I'm not a hardcore developer), I was able to do the calculation and update the data that way. I would just need to have a regular cron job of some kind hit the php page. Here's what the code looks like, minus my account details. It follows the code style in the API documentation. function updateAge() { global $wsdl,$AccountID,$ProfileName,$Password; try { //init the SOAP Client $SoapClient = new SoapClient($wsdl); $affected=$SoapClient->UpdateData($AccountID, $ProfileName, $Password, "BB_Model", false, "Age", "datediff(day,Birth_Date,getdate())/365"); } catch (SoapFault $fault) { //SOAP fault handling $str = "<h1><b>Fault:</b> faultcode: {$fault->faultcode}, <b>faultstring:</b> {$fault->faultstring}</h1>"; print($str); } }
  2. I need to be able to search on an "age" field. To be current, the age field would be calculated using the birth date. How can I periodically update the age field? Can I use some kind of cron job to update the value? (This is related to an earlier post, http://forums.caspio.com/index.php/topic/4039-working-with-calculated-age-from-date-of-birth/. Apparently I can't do what I need to do with a calculated field in a report.) Thanks in advance!
  3. I'm using a calculated field. I thought I saw something about searching on a calculated field, but yes, it makes sense to have to save it. How would I do that? I haven't figured out how to do that kind of thing in Caspio yet.
  4. I have a table that includes the person's date of birth (DOB). I am able to create a virtual field in my Report DataPage that calculates the age from the DOB and display it. I also need to be able to search on age. How can I do searches such as: 1. Age is equal to x 2. Age is greater than x (minimum age is x) 3. Age is greater than minimum x and less than maximum y Thank you for any help on this. The application has to do with booking models, where age is an important factor.
×
×
  • Create New...