CA Service Management

 View Only
  • 1.  Issue working with ca_fdSelectOption

    Posted Jun 17, 2014 05:13 AM

    I'm facing some issue, working with ca_fdSelectOption function.

     

    The fact is, i want to "set" a value from my select field- whose id is " primcontact"- (populated by querying the ca_contact table ,selecting the fields "contact_uuid" and "last_name"), and when the scripting is parsing, i guess it stops on the line where i have this ca_fdSelectOption, because the instructions that should occur after that line ,simply don't occurs.

    i've tried to use alert function to check if the values were not empty/undifined or nulls, and in fact they have the values that they should.

     

    For my example, a CI should have assigned a Primary contact, and that primary contact has as last_name "6405" and as contact_uuid "353b6ae3a9b82848b589019f8c039fec"

    on my Data Object, i have the following query:

     

    select  distinct cor.resource_contact_uuid, cnt.last_name

    from ca_contact cnt

    inner join ca_owned_resource cor on cor.resource_contact_uuid = cnt.contact_uuid

    where cnt.inactive=0 

    order by last_name

     

    Table: ca_owned_resource, ca_contact

    Fields: resource_contact_uuid, last_name

     

     

    i have the command structured as " ca_fdSelectOption('simplesCI','primcontact',result[0].resource_contact_uuid,result[0].last_name); "

    I've checked both variable content using an alert , and both return the expected values ...

    if i insert an alert on the line after this ca_fdSelectOption, that alert doesn't happens ... also as the rest of my script ...

    Its strange, once on the same script i use the function ca_fdSelectOption, with the same structure, and it runs normally, and in this particular case, is not having the expected behaviour.

     

    any tip/hint will be appreciated

     

    IvoReis.



  • 2.  Re: Issue working with ca_fdSelectOption

    Posted Jun 19, 2014 10:05 AM

    any tip/hint would be appreciated

    i'm stuck on this ...



  • 3.  Re: Issue working with ca_fdSelectOption
    Best Answer

    Posted Jun 19, 2014 05:04 PM

    It could be a problem with Character encoding. My assumption is that you're using SQL Server. Try modifying your query in your report data object as follows:

     

    select  distinct (sys.fn_sqlvarbasetostr(cor.resource_contact_uuid)), cnt.last_name

     

    Good luck,

     

    Joe Ahrens



  • 4.  Re: Issue working with ca_fdSelectOption

    Posted Jun 20, 2014 04:10 AM

    you're right Joseph!

     

    was related with character encoding ... but with another format: i apply the prefix "dbo.hex(contact_uuid)" and it works!

     

    thanks a lot for your time =D