Hi All
As anybody tried and got this to work with a select statement; this is as video FP11_Cal3
Here is the select statement I am using; This statement works fine both SQL command window and the SQL Query Genie
I have replicated what Selwyn shows in the video I know the javascript is correct because I have used the code below and It populates the dialog calendar control
this code uses the field names from one table
The problem I seem to be having with the Select is that the jsonData is returing []
I am on a pre release build 4060-3147.
Can anybody see anything wrong with what I am doing
Andy
As anybody tried and got this to work with a select statement; this is as video FP11_Cal3
Here is the select statement I am using; This statement works fine both SQL command window and the SQL Query Genie
Code:
dim startDate as d dim endDate as d startDate = date_value(val(e._year),val(e._month),1) if val(e._month) < 12 then endDate = date_value(val(e._year),val(e._month)+1,1) -1 else endDate = date_value(val(e._year)+1,1,1) -1 end if dim jsonData as c dim def as p myS_date = dtoc(startDate,"12-") myE_Date = dtoc(endDate,"12-") dim defn as p defn.type = "sql" defn.connectionString = "::Name::********" defn.tableName = <<%sql% SELECT projects_activities.idActivities, concatenate(projects_activities.idActivities, ': ', projects.Title) AS eventName, projects_activities.Deadline AS orderDate, concatenate('Order: ', projects_activities.idActivities, ': ', projects_activities.Activity_Note) AS eventdescription FROM projects_activities projects_activities INNER JOIN projects projects ON projects_activities.ProjectID = projects.idProjects %sql% defn.startDate = myS_date defn.endDate = myE_date defn.eventDate = "OrderDate" defn.eventId = "IdActivities" defn.eventName = "EventName" defn.eventDescription = "Eventdescription" jsonData = a5_GetCalendarEventDataJSON(defn)
this code uses the field names from one table
Code:
dim defn as p defn.type = "sql" defn.connectionString = "::Name::********" defn.tableName = "projects_activities" defn.startDate = myS_date defn.endDate = myE_date defn.eventDate = "Deadline" defn.eventId = "idActivities" defn.eventName = "Activity_Type" defn.eventDescription = "Activity_Note" jsonData = a5_GetCalendarEventDataJSON(defn)
I am on a pre release build 4060-3147.
Can anybody see anything wrong with what I am doing
Andy