Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to pass column from a reference field in $sp.getRecordDisplayValues?

theBeastMaster
Mega Guru

How can we pass reference field columns to $sp.getRecordDisplayValues?

I tried with below code but doesn't work.

var obj = {};
var columnsToGet = 'number,agency.number,agency.name';
$sp.getRecordDisplayValues(obj, gliderecord, columnsToGet); 

where agency is a reference field. Number is populating since it is part of current table but other fields are not populating. Please advise.

1 ACCEPTED SOLUTION

Thanks for your support. But, I somehow made it work through the existing code itself.

 

Instead of item.agency.name,I used item["agency.name"]. My bad, we can not directly fetch values of keys with such names abc.xyz by simply dot-walking. Instead, we need to fetch the same by passing it as a key.

View solution in original post

5 REPLIES 5

Good one.

My bad i did not think from that way. you are correct here. 

mark your answer as correct and close this thread.