aggregate to simple query resolution

aggregate to simple query resolution

hi guys please i ahve a problem in emulating aggregate query in simple query.

my pe version is running on OS version 9 and dev server is running on version 8.Now i have a module  built on version 9  and i want to recreate it in version 8. here is the challenge in simple query when bulding a condition in the query you cannot do something like = session.year.yearid which means session variables are not within the scope of the query builder in simple query while in aggregate it not an issue. as i work around i use an input paratemeter year where = year(input paramter)

then later assign the session.year.year = year  to the year input builds without error but the problem is when i run action conatining the qury it doent work . please how can i solve this limitation


Hi Tom,

Did you try using debug to check if all variables have the correct values?

Maybe some screenshots will help us seing what is wrong, but what you said is correct: in version 8 you need to pass the values as inputs instead of using the expressions directly.

João Rosado
@João Rosado . i did and i found out that it not passing the value of the input paramter to the query attached is the module itself.  my issue is on firmpost page . i have implemented all the logic to filter firmpost by year(thanks to suraj help on that) but my issue is that when i select a year and search it doesnt pass the value of my selection to the query for filtering, so that table works and displays the right year.on PE using aggragates as i explained above it works. please kindly check my espace so you can understand my issue.Thank you.

(Disclaimer: don't have a Service Studio 8 here at the moment, so just upgraded your to 9 and tried to understand what would have been done in your before the upgrade)

Also there is no "firmpost page", so I assume you are talking about the FirstPostings_List because it's the only one using the Years session variable.

I'm not exactly sure how does this look in the simple query, but in the upgraded version your query has an "or" on the year filter.

You need to add a different condition in your simple quer if you want it to filter the query.
Like that it is searching for lines with either a match on "Name", "RegN0" or "Year".

João Rosado
@João Rosado you are right its firmpost list.ok i have seen your snapshot but please dont be offended am stilla learner i dont really understand what you mean by "You need to add a different condition in your simple quer if you want it to filter the query"  are you saying i should moddify my condittion for the query if yes what you suggest i change.and in this point  Firmposting.Year like "%" + Sessions.Years.Year2.Year+ "%"  .it not possible on version 8 because the scope for bulding the session variable condition is not in simple query only aggregates. i used this instead Firmposting.Year like "%" + years+ "%". years is an input parameter of text type. Again apologies for my newbie questions.
Hi again,

Just installed a version 8 to make a couple screenshots :)

So, you currently have this:

That means it will return results if ANY of the 3 parts of the search are true.

If you want the Year to act as a filter you need to add it as a different condition, like this:

Edit: also you should set it that input as search parameter, to improve the query performance a bit when the value is empty:

João Rosado
@João Rosado i did as you said but instead it cant filter didnt work. please is it working on your own end. i filter using the combo box by year and i click search it refuses to work. i folowed the steps in the screenshot and it didnt work. please can you try and see if it works on your machine. i have run out of options.Thanks

I don't have a platform 8 server (only installed a Service Studio to be able to take the screenshots) on my machine so can't test it in runtime at the moment.
Can you upload the modified oml with the change that I suggested?

Also use the debugger and take a screenshot of the values of the variables when the breakpoint is stopped at the simple query, to see what value inputs are being used.

João Rosado
ok thanks.check the attachment for full details of the issue