cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LalaRob
Regular Visitor

SP Datacard, Text in Quotes does not delete

Hello,
I have a problem with a Datacard.
The datacards are forms of a SP, several datacards (several selection possibilities) should fill a certain datacard with Concat. The code is written in the default area of this certain datacard and is as follows

 

 

If(!IsEmpty(StoßstangeVR.SelectedItems);
    " -Stoßstange vorne rechts: " & Concat(StoßstangeVR.SelectedItems;Value;", ");
    ""
)
&
If(!IsEmpty(StoßstangeVM.SelectedItems);
    " -Stoßstange vorne mitte: " & Concat(StoßstangeVM.SelectedItems;Value;", ");
    ""
)
&
If(!IsEmpty(StoßstangeVL.SelectedItems);
    " -Stoßstange vorne links: " & Concat(StoßstangeVL.SelectedItems;Value;", ");
    ""
)

 


The problem is that the text in the quotes is not deleted. NewForm() is already used and the other datacards also reset, only the text in the quotes from the specific datacard is not deleted, only what is after Concat is deleted.

 

Appreciate any help.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @LalaRob ,

The concept of blank and empty with combo boxes is something I have found to be problematic at times - the below should work.

If(
   Len(StoßstangeVR.Selected.Value) > 0;
   " -Stoßstange vorne rechts: " & 
   Concat(
      StoßstangeVR.SelectedItems;
      Value & ", "
   )
) & 
If(
   Len(StoßstangeVM.Selected.Value) > 0;
   " -Stoßstange vorne mitte: " & 
   Concat(
      StoßstangeVM.SelectedItems;
      Value & ", "
   )
) & 
If(
   Len(StoßstangeVL.Selected.Value) > 0;
   " -Stoßstange vorne links: " & 
   Concat(
      StoßstangeVL.SelectedItems;
      Value & ", "
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @LalaRob ,

I am not entirely clear what you are trying to do here, but you code could be condensed to the following - what do you mean by "not deleted"

With(
   {
      wVR:StoßstangeVR.SelectedItems,
      wVM:StoßstangeVM.SelectedItems,
      wVL:StoßstangeVR.SelectedItems,
      wTitle:" -Stoßstange vorne "
   };
   If(
      !IsEmpty(wVR);
      wTitle & "rechts: " & Concat(wVR,Value & ", ")
   ) & 
   If(
      !IsEmpty(wVM);
      wTitle & "mitte: " & Concat(wVM;Value & ", ")
   ) & 
   If(
      !IsEmpty(wVL);
      wTitle & "links: " & Concat(wVL;Value & ", ")
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hey WarrenBelz, thanks for the reply, unfortunately the same problem here too.

 

So I have a SharePoint list that has several columns. These columns are displayed in the app as DataCards. Here in these DataCards you can make a selection (dent, scratched, deformed) for the "Front right bumpers" Datacard, for example. There are several DataCards (windscreen, wing, driver's door, passenger door, etc.). All Datacards are then to be collected in one specific Datacard with concat. This one particular DataCard is transferred from the SP List to a Word template via PowerAutomate. So that all the damages are next to each other as text (in the Word Template).

 

The problem is that when I add a new car and want to include this damage, it does not delete the text in the quotes from the specific Datacard, only the selection is deleted (dent, scratched, deformed) in the DataCard itself.

 

So in the picture, what is written in "red" always stays in. Even if I have not selected anything for the DataCard. As you can see, it always says "- Front right bumper: - Front centre bumper: - Front left bumper".
But I only want it to be displayed if I have made a selection. ("-Front right bumper: Dent, Scratched; Front left bumper: Scratched") I don't want it to say "-Front centre bumper:" in between of right bumper and left bumper, because I haven't selected anything for it.

 

A long text, I hope I was able to make it understandable.

Thank you for any help.

 

Hi @LalaRob ,

The concept of blank and empty with combo boxes is something I have found to be problematic at times - the below should work.

If(
   Len(StoßstangeVR.Selected.Value) > 0;
   " -Stoßstange vorne rechts: " & 
   Concat(
      StoßstangeVR.SelectedItems;
      Value & ", "
   )
) & 
If(
   Len(StoßstangeVM.Selected.Value) > 0;
   " -Stoßstange vorne mitte: " & 
   Concat(
      StoßstangeVM.SelectedItems;
      Value & ", "
   )
) & 
If(
   Len(StoßstangeVL.Selected.Value) > 0;
   " -Stoßstange vorne links: " & 
   Concat(
      StoßstangeVL.SelectedItems;
      Value & ", "
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Wow, thank you very much. Thats what I needed.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,819)