populate Timezone under Picklist

Posted by mysteryminds on 31-Dec-2014 13:56

I have a trigger which has to populate a field to show in PICKLIST 

just want it to copy the TIME ZONE and STATE over to a record

I could do it if i changed the TODO field to a text box

but i want the todo field to be a DROPDOWN 

All Replies

Posted by pvorobie on 31-Dec-2014 14:23

For picklists (drop-down lists) please set their value to VALUE attribute used in HTML. I cannot say more based on info you provide.

Posted by mysteryminds on 31-Dec-2014 14:40

Dear Pvorobie

Well please find below the sequence

This is the trigger where we are updating the field TIME zone

suppose to receive the values to this filed TIMEZONE here 

but when we see in the front end they are no values but just a defined variables but no values assigned to it

Posted by pvorobie on 31-Dec-2014 15:18

Try using rbv_api.getIdByCode (objName, fieldName, code) API to determine ID of your selection. Use that ID in

rbv_api.setFieldValue(objName, objId, fieldname, newValue) call.

Posted by mysteryminds on 31-Dec-2014 15:32

sorry Robie... can  you give some advise on that, as I'm true novice to RB....  Where should i use that  

Posted by murali on 31-Dec-2014 16:28
 
Hi,
  What  Pavel said is this :
 
The trigger that you have is used to update the value of the picklist. Correct?
 
The return type of the  trigger formula has to be one of the acceptable values of the picklist.
 
So your formula should look something like this ::
 
rbv_api.getIdByCode("to_do_object_integration_name", "time_zone_picklist_integration_name", "{!timezone-code-value}");
 
Here, your {!timezone-code-value}  is the real variable of your formula.
 
Acceptable values are ( from the image that you shared )
                CST, EST , MST and PST
 
 
 
 
 
[collapse]
From: mysteryminds [mailto:bounce-ksunilallwesterncom@community.progress.com]
Sent: Wednesday, December 31, 2014 4:33 PM
To: TU.Rollbase@community.progress.com
Subject: RE: [Technical Users - Rollbase] populate Timezone under Picklist
 
Reply by mysteryminds

sorry Robie... can  you give some advise on that, as I'm true novice to RB....  Where should i use that  

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]
Posted by mysteryminds on 31-Dec-2014 19:04

Well Murali

I've tried all the holy things possible with my lil understanding of RB but seems I'm missing something somewhere

The value for the Time Zone is a reference field {!R83831479.time_zone#value}

Should we take an ID or Value here

So if have to correct myself in understanding what you are trying to say  the code which I would write here is 

rbv_api.getIdByCode (objName, fieldName, code) 

rbv_api.getIdByCode("<which object name goes here- is it the reference object name > ", "<WHICH FIELD IS THAT >", "<WHICH IS THE CODE>)

rbv_api.getIdByCode("R83831479", "Time_Zone", "{!R83831479.time_zone#value}");

Posted by Sri Harsha on 01-Jan-2015 23:49

Hi,

1.  "<which object name goes here- is it the reference object name >"  - The reference record Object name.

2.  "<WHICH FIELD IS THAT >"  -  The picklist field integration name in the reference object.

3.  "<WHICH IS THE CODE>)"  -   The code and value for a picklist item in Rollbase is provided in the form " <CODE>|<VALUE>".  So, as per the image attached by you previously, the possible code names of the picklist are CST, EST, MST and PST.

Please let us know if you are able to move ahead with the provided information or if you need anything else.

Thanks & Regards,

Harsha.

This thread is closed