Hi everyone,
I have a form connected to SP1 in which I can select a "Language(s) required" field which values come from SP2, saving the value(s) in SP1.DestinationLanguage single line text column.
One of the possible values is "Other", which if I select makes visible another field called "Other language".
"Other language" is a text field which is connected to SP1.DestinationLanguage.
What I would like to do is to be able to select "Other" and other languages in "Language(s) required", and that it saves to SP1.DestinationLanguage whatever languages are selected in "Language(s) required" (except "Other" value) and whatever the user introduced in "Other language" field, separated by comma ",".
Thanks
hi @madlad
I have fixed it, I had to also put the code in the Other language Update property and it has worked as expected.
Thanks a lot!
Nothing jumps out as missing or incorrect here; These look quite good overall, unless there's something I'm overlooking here.
I'm not sure you need a Value() around "cdv_Translation_Other_DestinationLanguage.Text" in the Other Language Update, and there's no Items property for a text input, but neither of these should affect swapping "Other" for the other language input.
One helpful thing would be if you could put a label somewhere, and put the text value to *YourForm*.Updates.DestinationLanguage, and fill the form in, but don't submit the form yet? This will give a live view of what is being returned to this field.
From there, you might just have to play around with it - just make sure that all the form field names, control and column references, and anything else is correct. One thing to check could be that the data card where the Concat(...) is the update property should be the one that has your "DestinationLanguage" as the data field.
Hi,
Concat(
ForAll(
cmb_Translation_DestinationLanguage.SelectedItems;
If(
ThisRecord.LanguageName = "Other";
cdv_Translation_Other_DestinationLanguage.Text;
ThisRecord.LanguageName
)
);
Value;
", "
)
Sort(
gtms_dim_Languages;
LanguageName;
SortOrder.Ascending
)
2. Other language datacard:
a) Update property:
Value(cdv_Translation_Other_DestinationLanguage.Text)
b) cdv_Translation_Other_DestinationLanguage text input
Sort(
gtms_dim_Languages;
LanguageName;
SortOrder.Ascending
)
Thanks
Hi!
I notice you use a SP list as the items property for the dropdown's items, could you try replacing my "ThisRecord.Value" with "ThisRecord.*ColumnName*", where columnname is the name of the column that the language names are stored in?
If this still doesn't work, could I ask what the names of your controls are, and what exactly the items property of your languages dropdown is?
The code I provided worked in tests, and it should replace "Other" with the Other Language Text Input's value, but it may need to be modified slightly.
Let me know! 🙂
Hi @madlad
I have tried your solution but it doesn't record what I write in the "Other language" text input.
I would also like to not include the "Other" value from "Language(s) required".
Thanks!
Hi!
This can be done by setting the Update Property of the "Languages Required" Data Card to be something like:
Concat(
ForAll(
*LanguagesDropdown*.SelectedItems,
If(
ThisRecord.Value = "Other",
*OtherLanguageInput*.Text,
ThisRecord.Value
)
),
Value,
", "
)
^This will get every item in the dropdown, except it will replace the option "Other", with whatever's in the text input. You'll need to sub in your control names where I've *surrounded in asterisks*. If it's a modern text input you'll need to use ".Value" instead of ".Text"
Hope this helps! 🙂
WarrenBelz
146,605
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional