I am not able to fetch the data from server side to client side as well as HTML side ( portal)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2024 09:48 PM
server script :
if(input &&input.controller)
{
// gs.addInfoMessage('test_1234'+input.controller);
// gs.addInfoMessage('test'+selectedButton);
var reasonList = [];
var tagValue;
switch(input.controller) {
case 'IT':
tagValue = gs.getProperty('sn_walkup.wu.reasons.tags.IT');
break;
case 'HR':
tagValue = gs.getProperty('sn_walkup.wu.reasons.tags.HR');
break;
case 'Finance':
tagValue = gs.getProperty('sn_walkup.wu.reasons.tags.Finance');
break;
}
//gs.addInfoMessage('tag'+tagValue);
var grReasons = new GlideRecord('wu_m2m_location_queue_reason');
grReasons.addEncodedQuery('wu_location_queue=' + queueId + '^sys_tags.' + tagValue + '=' + tagValue);
grReasons.query();
while (grReasons.next()) {
// gs.addInfoMessage(grReasons.getDisplayValue('wu_reason'));
var reasons = {
value: grReasons.getValue('wu_reason'),
label: grReasons.getDisplayValue('wu_reason'),
//display_text_area: !!grReasons.display_text_area
};
reasonList.push(reasons);
gs.addInfoMessage('tasty'+reasonList[0].label);
}
data.reasonList = reasonList;
gs.addInfoMessage('test_123'+data.reasonList[0].label);
//gs.info('Selected Button: ' + selectedButton);
//gs.addInfoMessage('Reason List: ' + data.reasonList.label);
//gs.addInfoMessage('Reason List: ' + data.reasonList.value);
}
client side :
c.data.issueChoices = c.data.reasonList;
HTML:
<sn-choice-list
ng-click="c.onOptionClick(c.data.selectedIssue, 'emp', 'employee-textarea')"
class="form-field options-drop"
id="issue-dropdown-employee"
sn-model="c.data.selectedIssue"
sn-text-field="label" sn-value-field="value"
sn-items="::c.data.issueChoices"
sn-options="{placeholder:data.msgs.selectMsg}"
>
</sn-choice-list>
ng-click="c.onOptionClick(c.data.selectedIssue, 'emp', 'employee-textarea')"
class="form-field options-drop"
id="issue-dropdown-employee"
sn-model="c.data.selectedIssue"
sn-text-field="label" sn-value-field="value"
sn-items="::c.data.issueChoices"
sn-options="{placeholder:data.msgs.selectMsg}"
>
</sn-choice-list>
server side code is working fine we are getting the value but i am not able to move the server to client as well as HTML.
Can you suggest the code.
Thanks and Regards,
Chandan
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2024 10:13 PM
@Gajanan Can you help on this .