CA Service Management

 View Only
  • 1.  Default Value Field in the Offer

    Posted May 30, 2018 10:28 AM

     

    Hey guys, 


    I have some custom fields in a Catalog offering with some predefined options, like the location of the requesting user.

     

    I would like to know if there is any configuration in the offer where I can define this field with the last value entered by the user, as with the name, email and telephone fields, as shown:

     

     

    Do I need to set some value in the offer as well as the Name and Email fields?

     



  • 2.  Re: Default Value Field in the Offer

    Posted May 30, 2018 01:14 PM

    So you want to bring back the value the user entered the last time he requested this offering?



  • 3.  Re:  Default Value Field in the Offer

    Posted May 30, 2018 01:18 PM

    Hi pier-olivier.tremblay!

     

    Exactly, bring back the value the user entered the last time he requested the offering!



  • 4.  Re:  Default Value Field in the Offer

    Posted May 30, 2018 01:51 PM

    The easiest way would be to ask your user to copy their request

     

    The other way is : create a report object that returns all the field values from the previous request.

     

    Just typed the query and at first glance it seems to work fine.

     

     

    SELECT
    convert(nvarchar(max),URIF.form_elem_value) AS field_value,
    convert(nvarchar(100),URIF.form_elem_name) AS field_name
    FROM mdb.dbo.usm_subscription_detail AS USD
    INNER JOIN mdb.dbo.usm_request_item_form AS URIF
    ON URIF.subscription_detail_id = USD.id
    where request_id = (select max(ur.request_id)
    from usm_request ur
    inner join mdb.dbo.usm_subscription_detail usd
    on usd.request_id=ur.request_id
    where usd.offering_id=%OFFERING_ID% and req_by_user_id='%USER_ID%')

     

     

     

    Are you familiar with the necessary JavaScript to run this query and set the value to your fields?