How can we clear selected item from Cross-Site Lookup

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
User avatar
Gökhan Manav
Posts: 27
Joined: Fri Nov 07, 2014

07 Nov 2014

Hi;

How can we clear selected item from cross-site lookup column.

For example : For country column, I selected Turkey and then I want to disselect this column or clear this column.

I though now we can not clear or ı couldn't not find.


Please help me

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

10 Nov 2014

Hi,

Please, put Hyperlink or Button control near the lookup field in Forms Designer and assign the following code to its OnClick property:

Code: Select all

fd.field('LookupField').value('');
return false;

Replace 'LookupField' in the code above with the internal name of your field. This control will allow users to clear the lookup field.

User avatar
Gökhan Manav
Posts: 27
Joined: Fri Nov 07, 2014

10 Nov 2014

Ok.Thanks Dmitry;

I will try and write result.

Maybe you can put this attiribute default to Cross-site Lookup.

User avatar
Gökhan Manav
Posts: 27
Joined: Fri Nov 07, 2014

10 Nov 2014

Hi Dmitry;

I have ~40 Lookup column(it can increase around 100 for all lists) and I understood ı have to write code for all of them.

This is very very long way.:(.

What can I do?I can write a code but it must affect all of lookup columns.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

12 Nov 2014

Do you mean that you need a single button that clears all lookups on the form?

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests