How to use data in form from lookup

Hello,
I came across this article and have a question.

https://plumsail.com/docs/forms-sp/how-to/lookup-view.html

The thing that I`m trying to achieve is to use the data from this lookup in the form to show hide fields based on user selection of the dropdown field.

Example:

If a user selects bow ties and they are from silk I need to show a textbox field else hide.
If a user selects ties and they are from wool I need to show a dropdown field else hide.

So my question is how can I access that lookup data for manipulation?

Can I retrieve multiple values from a list row and use it?
Example:
Bow Tie; Men; Silk; Red.

Thank you!

Hello @Vasilii_Burca,

As described in the article, to get extra field values, first, you need to specify internal names of the fields in lookup field settings >> General >> Extra Fields.

Then you can get extra field value using this code:

fd.field('LookupFieldName').value.ExtraFieldInternalName

E.g: fd.field('Lookup').value.Document_x0020_Status

For the lookup field that allows selection of multiple values, you need to specify the index of the selected value in the array:

fd.field('LookupFieldName').value[1].ExtraFieldInternalName

Please find more information about the lookup field in the documentation.

Hello @mnikitina,

Worked like a charm !!!

Thank you !!!

1 Like

@mnikitina the image in your post above is broken - could you re-post so I can see how the extra fields need to be included?

@Gabegia,

Here you go:
image

1 Like