4 Replies Latest reply: Nov 22, 2010 3:00 PM by Miguel Angel Baeyens de Arce RSS

    String Function in Set Analysis

    Dinesh Thoniparambil

      My NT ID comes in the form of NTLOCAL\john.smith

      I need to change time based on the logged in user. Each user's GMT Offset is stored in the database. When I hard code the value, I get the correct value:

      =sum({<[DB User Name] = {'John Smith'}>} [GMT Hour Offset])

      The below string also gives the correct value:

      =trim(capitalize(replace(mid(OSUser(),9),'.',' '))) gives a value : John Smith.

      However, the below set analysis while correct in syntax, does not give the correct value:

      =sum({<[DB User Name] = {$(=trim(capitalize(replace(mid(OSUser(),12),'.',' '))) )}>} [GMT Hour Offset])

      Where are I going wrong? Any better suggestions?