Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Calculated Values list field value in Custom Object

SaravananRajara
Collaborator III

The below function is reading values of values list field but i am not to get if the values list field is calculated.  Please help me to get the value of calculated values list field through custom object

 

"ArcherTech.UI.GenericContent.GetInstance().getFieldValue(fld_Id, false);"

 

We are using Archer 6.3 P3 version.

1 ACCEPTED SOLUTION

Accepted Solutions

Try this one:

var RPFieldRoot = ArcherTech.UI.ClientContentManager.GetInstance().getFieldById(fldId);  
var RPFieldRootId = RPFieldRoot.clientId;
         
return $('div[id*="'+ RPFieldRootId +'"]').text().trim();‍‍‍‍‍‍‍‍‍

View solution in original post

28 REPLIES 28

DavidPetty
Archer Employee
Archer Employee

Saravanan try,

$('span[id*="f' + fld_Id + '"]').text().trim();

 Advisory Consultant

Its also returning an empty value.  

 

  • ArcherTech.UI.GenericContent.GetInstance().getFieldValue(fldid, false); returning "null" value
  • $('span[id*="f' + fld_id + '"]').text().trim(); returning "" empty value.

Try this one:

var RPFieldRoot = ArcherTech.UI.ClientContentManager.GetInstance().getFieldById(fldId);  
var RPFieldRootId = RPFieldRoot.clientId;
         
return $('div[id*="'+ RPFieldRootId +'"]').text().trim();‍‍‍‍‍‍‍‍‍

Saravanan, is the field on the layout?  If not, you need to place it on the layout in order for the custom object to access it.

 Advisory Consultant

Ilya, for calculated fields it's span and not div  

 

At least in 6.4 P2 it is.

 Advisory Consultant

Well, I just created VL field and tried it out. But I agree, mine case could be for the normal VL, not calculated one. But I thought there would be no difference between VL in view mode and calculated VL, as both of them are in read only. But nevertheless.

 

Saravanan, take into account that code I shared is working for VL in view mode.

Yes, the field is on layout and on some scenarios it may be hidden by DDEs.

Its working correctly. Great! Thank you:)

Welcome