2

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.

6
  • have you tried anything to get the text value? could you please include your code?
    – glls
    Jul 25, 2018 at 18:28
  • I don't see anything in the documentation so suspect the answer is "no".
    – Keith C
    Jul 25, 2018 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, 2018 at 18:45
  • Thanks for the help everyone, for now, I am accepting that this is not viable so I built around it. Jul 25, 2018 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. Aug 6, 2018 at 6:39

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .