Confused by tutorial problem

Howdy all, I've been going through the training for developers, and yesterday hit a snag while trying to follow along with the example for Level 2 of the Style Guide.

I created as near as I can see an analogous Task List application, and it mostly works except for 2 odd issues:

1. The filter doesn't work on the Tasks home page. No matter what I type in the filter box, the entire list of tasks is returned. I've stepped into the code with the debugger, and the query parameter to compare the title and description to is being properly set, but the results of the query seem to be ignoring the filter condition (which is Task.Title like "%" + SearchKeyword + "%" OR Task.Description like "%" + SearchKeyword + "%"). The SearchKeyword value is set to "test" (for example), but all items are returned in the query regardless of whether "test" is in them or not.

When I run a test of this query in service studio, the filter conditions work properly (screening out all non-matching entries), but at runtime, they have no effect.

2. I can't get the validation messages to show in the TaskEdit Save action.  I step through the code, and it properly detects a due date before today and branches to the assignment widget that sets the .Valid and .Validation fields of the Task_DueDate widget, and the flow keeps me on the Edit page, but the validation message never appears.

I've attached the eSpace if anyone cares to look at it and offer advice.

Thanks in advance for any ideas.  I'm frustrated, because I've done both of these things successfully in earlier lessons!
Hi Jeffrey,

In a first overview I can see that problem 1) is caused by the fact that the SerchInput in the Task_List screen in binded to the variable Session.TASK_SearchKeyword and the value that you are passing to the GetTasks query is Session.TEMPLATE_CUSTOMER_SearchKeyword.

Just change correct the variable that you pass to the GetTasks query to Session.TASK_SearchKeyword and you'll have your search working.


Daniel Lourenço
Hi Jeffrey,

You second problem (the fact that the validation message is not appearing) has two reasons:
1 - The button in which you want to perform the validation (the Save button) is using the Ajax method -and you are not refreshing any widget when processing the request (in the screen action) - this means that nothing in your screen will change.

To fix this, you have two options - either you change the method of your button to Submit (and the page will be re-rendered), or in the screen action you refresh the EditRecord (using the Ajax Refresh tool - see the image below).

Read the article About Rich Web Screens using Ajax in the Service Studio online help to know more about this.

Best Regards,

Daniel Lourenço

Thanks, Daniel.  I knew I was doing something wrong -- I suspectedit had something to do with a refresh on the display issue.

I just totally missed the filter thing.

Much obliged!