Announcement

Collapse
No announcement yet.

Help! - Using a select field as the calendar description field?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help! - Using a select field as the calendar description field?

    Hi - I have added a calendar application to an existing table. All working other than, the calendar "Description" field is a select (picking up product description from another table using product id in the table) It works fine in the form view, however in the Calendar view it shows the original id (used in the lookup)
    Any idea's? It's driving me mad.
    See image.
    Andy
    Sriptcase V9
    The No is the product id used in the select.
    Last edited by ajc1502; 11-29-2017, 06:10 PM.

  • #2
    i solved this by adding a function which changes the value of the field on the event onValidateSucces. Since you can not change the SQL you can do this using this code.
    In my case i change the 'title' field based on the 'category'.

    I lookup the value and apply it to the field. something like this
    sc_select(my_data, "SELECT
    Dienst
    FROM
    tbldiensten
    WHERE
    (Id = '{category}')");

    if ({my_data} === false)
    {
    echo "Access error. Message =". {my_data_erro};
    }else{
    while (!{my_data}->EOF){
    {title}={my_data}->fields[0];
    {my_data}->MoveNext();
    }
    {my_data}->Close();
    }


    Comment

    Working...
    X