function setColor() {
var layoutValue = 'red';
var finalLayout = 'single_asset_promo_module';
if(layoutValue) {
someService.get('id')
.then(function(childNode) {
var newData = {
nid: 'nid',
type: [{value: 'target_id'}],
color: childNode.field_promo_text_color
};
execUpdate(newData);
});
}
else if (layoutValue === 'someother_color' ) {
if('value') {
var newData = {
nid: [{value: 'target_id'}],
type: [{target_id: 'promo'}],
field_promo_text_color: 'field_band_text_color',
};
execUpdate(newData);
}
}
return finalLayout;
}