cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wense
Level: Powered On

Customized form for sharepoint / lookup field, ListBox, link to item

Hi everyone,

I am new to powerapps, still missing basic knowledge. nevertheless i managed to build up a customized form, which manages my sharepoint list with ~ 40 colums. I work with three screens for show, edit and new. Furthermore i implemented tabs via varFormTabs to reduce complexity.

 

Everything works fine. Data can be created, edited and are shown in the right way. With the following exception: In my sharepoint list I have some multiple-entries-allowed lookup fields. They link to different sharepoint lists. Within the standard sharepoint table view, the lookup field have automatically received working links to the respective items of the other list. Within the powerapps form I have managed to show the multiple items via a ListBox element (one item per line was important for me). The title is shown correctly but I am not able to implent a link-to-item function. Could someone lead me on the right track? On which function I need to look? I tried a little bit with onselect, lookup-function etc. but I was not able to find the right approach. Thanks!

5 REPLIES 5
Community Support Team
Community Support Team

Re: Customized form for sharepoint / lookup field, ListBox, link to item

Hi @wense ,

Do you mean that you want to display the look up column as a link like the sharepoint list in the custom form?

By default, the lookup column will display as a combo box in custom form, if you still want to click the data and lauch the link, you need to customize.

I've made a similar test for your reference:

1)my list name is list3, lookup column name is topic, look up column linked to list2's topic column 

2)in the lookup column data card, insert a listbox.

3)Set the listbox Items: 

DataCardValue3.SelectedItems    (DataCardValue3 is the combo box name)

Set the listbox's OnSelect:

Launch(LookUp(list2,topic=ListBox1.Selected.Value,'Link to item'))

Then, i if you click the data in the listbox, you will launch to the linked item of list2.9132.PNG

 

Do not forget to add connection with list2.9133.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
wense
Level: Powered On

Re: Customized form for sharepoint / lookup field, ListBox, link to item

Hi @v-yutliu-msft

 

thanks for your help and your post.  Yes, exactly for this i am searching for. I did follow your idea. The Title is shown, but again without working link. I receive no warning by powerapps, so I guess the formula is ok. Just to make sure, if  I have understand the logic:  

Launch(LookUp(list2,topic=ListBox1.Selected.Value,'Link to item' > 'Topic' is related to list2, correct? And ListBox1 is related to list 3 via the datacardvalue? If both are identical, 'Link to item' is launched. Can I somehow check, if 'Link to item' has data in it? My data sources are  both implemented.

 

Maybe the sharepointlist causes the problem? do i need to obeye a certain format within a lookup column? There are some choices you can make...

Community Support Team
Community Support Team

Re: Customized form for sharepoint / lookup field, ListBox, link to item

Hi @wense ,

The current form's data source is list2.

The lookup column name is topic( in list2).

Topic column is related to list3(another sharepoint list).

ListBox1 is used to display topic column's data.

You could insert a label to see whether Link to item' has data in it.

Set the label's Text: LookUp(list2,topic=ListBox1.Selected.Value,'Link to item')

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
wense
Level: Powered On

Re: Customized form for sharepoint / lookup field, ListBox, link to item

Hi @v-yutliu-msft ,

 

I am still working on my problem, but I could isolate it a little bit. First I checked, if the 'Link to item' had some content. It was empty. So I tried a little bit. I received link-information, when I used for the launch(lookup()) function of my listbox my datacard as reference instead of the listbox.

Launch(LookUp(list2,topic=datacardvalue.Selected.Value,'Link to item'))

Unfortunately the launch function still did not produce a link. Then I found a hint in this forum, that a similar problem only happened in viewMode (Link). So I tried the exact same procedure I did before but now in my EditForm and the link worked.  So the problem seems to be in context with different viewModes. I tried further and changed the default mode of my viewForm from view to edit (I changed the listBox mode and the datacard mode to edit as well). I made a little happiness-jump, because now the link worked within the preview of powerapps. Unfortunately when I published it to sharepoint, the link still does not work. I guess because somewhere the Mode is changed to view again. But i have the feeling, that I am close to a solution.....some ideas?

wense
Level: Powered On

Re: Customized form for sharepoint / lookup field, ListBox, link to item

Hi @ ,

 

I already wrote a reply in the morning, somehow it was not published (system wrote "approval pending"??? maybe because i inserted an html link to another post?).

 

So even if this reply may be published, I describe my situation again: I still have the original problem but I could isolate it a little bit.

 

I crosschecked via label, if the link-to-item had content, which was not the case. So I tried a little bit and changed your original formula for the ListBox onselect option. The following delivered me the link (i used datacardvalue instead of listbox):

Launch(LookUp(list2,topic=datacardvalue.Selected.Value,'Link to item'))

But the lauch-function still did not generate a link. In the community post "PowerApps Form - OnSelect (not solved)" 12/2017 I found a hint, that sometimes a error occurs only in viewMode.  So repeated the same procedure I did before in my editForm. And indeed the link worked. I changed the defaultMode of the viewForm, datacard and listbox to Edit and voila, that helped and I had working link in my viewForm. Unfortunately only in the preview of powerapps. when i published it to sharepoint, the link still does not appear. I guess somehow "viewMode" is activated again. When I finished reading the mentioned post (last entry 3 weeks ago), i saw that they think, it is a bug. Can you confirm this? The walkaround mentioned there does not help me.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,866)