0

I have a form that connects to a SharePoint list, and some of the DataCards are comboboxes with two text options. I'm trying to use two of them inside an If to display a warning if the combination is wrong. I have tried the following:

  • DataCardValue3.Selected = "string", the error here is that I'd be trying to compare Record to String
  • DataCardValue3.Selected.Value = "string", I believe this should work but it doesn't, not because of an error but because it says the selection is "empty", like nothing was selected yet but even when I select an option the warning doesn't show
  • DataCardValue3.SelectedItems within a concat with "" as separator, this to extract the elements of the table that SelectedItems would get me, still came up empty
  • DataCardValue3.Selected.NameOfColumn, this because a combobox can apparently have data from more than one column but since this is a form connected to sharepoint automatic field in my case it doesn't, and it just gives me an error. My "column name" appears to be Value, but see point two.
  • DataCardValue3.Selected.Result, I've seen this in apps other people from my organization have made, it just gives me an error

I'd appreciate any guidance

TwoPointNo
  • 1
  • 1
  • 3
  • I figured out a work around, I went and made the fields text fields in the SP list and added comboboxes independent to the form that updates the list. By doing that I used combobox.Selected.Value in the Default property of the automatic form text input for those columns and there it did work. Seems the issue is with reading the content of the fields added automatically when you add a form connected to a list, so this is the work around for anyone that might stumble onto this question. – TwoPointNo Dec 29 '21 at 14:06

1 Answers1

0

It really depends on how the ComboBox is set up. If multiselect is allowed, Selected would always come empty. Same with the Default and DefaultSelectedItems properties.

I think you were really close, it would have worked this way as per my experience:

Concat(ComboBox1.SelectedItems,Field1 & Field2,"")

This gives you a string with the combinations. Alternatively you could make single-column table of the combinations with:

ShowColumns(AddColumns(ComboBox1.SelectedItems,"MyColumn",Field1 & Field2),"MyColumn")

Then you can use in, exactin, etc.

mmikesy90
  • 783
  • 1
  • 4
  • 11