Is there a way to access the text value of a lightning:inputField of lookup type? .get('v.value') returns the ID but I also want to retrieve the text value displayed within the lookup as well.

  • have you tried anything to get the text value? could you please include your code? – glls Jul 25 '18 at 18:28
  • I don't see anything in the documentation so suspect the answer is "no". – Keith C Jul 25 '18 at 18:44
  • Assuming you can create your own custom lookup component and access the text value instead of accessing it through lightning:inputfield – Rao Jul 25 '18 at 18:45
  • Thanks for the help everyone, for now, I am accepting that this is not viable so I built around it. – BiscuitKnees Jul 25 '18 at 20:58
  • How can you get the ID of the inputField? Can you please provide the code snippet to get the ID? I am also trying to get the text value of the lightning:inputField of lookup type. – Hariprasath Aug 6 '18 at 6:39

After much experimentation, I gave up. Instead I added in some logic to retrieve the Name value from the Database based on the ID instead of continuing to spin my wheels. Hopefully in the future there will be some more attributes accessible to developers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.