Issue with lightweight_glide_list

Dante Ditan
Kilo Sage

Hi,

 

I have a formatter that includes a ui macro and added it on the csm form.

In my UI macro I'm calling the lightweight_glide_list twice with different table,id,name and control_name but when I load the page the other glide list is expanded.

 

find_real_file.png

 

Code:

<td>
<g:macro_invoke macro="lightweight_glide_list" id="csm_component_0" name="csm_component_0" control_name="issueListCol" reference="sn_customerservice_component_issue" can_write="true" />
</td>
<td>
<g:macro_invoke macro="lightweight_glide_list" id="csm_component_issue_0" name="csm_component_issue_0" control_name="issueTypeListCol" reference="sn_customerservice_component_issue_type" can_write="true" />
</td>

 

 

1 ACCEPTED SOLUTION

Hi Dante,

 

There was a bug in renderonload function.

Use the below call,

lock(ul,'${jvar_control_name}','${jvar_control_name}_edit','${jvar_control_name}_nonedit', 'select_0${jvar_control_name_actual}', '${jvar_control_name}_nonedit');

 

Here the 5th parameter was 'select_0${jvar_control_name}' which must be changed to 'select_0${jvar_control_name_actual}'

 

This works fine. Let me know if any doubts.

 

Regards,

Suraj

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Dante,

I think that is how the behavior is for that UI macro. It shows as expanded.

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

no, as you can see the first macro does not expanded so I think there are some issues here.

surajp
Mega Guru

Hi Danta,

 

Pass an attribute start_locked="true" to g:macro_invoke tag, if you want the list to be locked on load of form.

Ex: 

<g:macro_invoke macro="lightweight_glide_list" id="csm_component_issue_0" name="csm_component_issue_0" control_name="issueTypeListCol" reference="sn_customerservice_component_issue_type" can_write="true" start_locked="true"/>

 

Mark correct/helpful if this answers.

 

Regards,

Suraj

 

Hi Suaj,

 

I tried it and it's not working. What I did is add on alert on renderonload in the ui macro and it only alerts one. Meaning it calls one macro invoke. I tried removing the first macro and the second one seems to be working