111962
(YU.)
January 4, 2022, 9:29am
1
How to set variables to dropdown list item (within create form activity)?
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
As belows, I defined 3 variables in the workflow.
Str_Target1 = System.DateTime.Now.AddYears(1).ToString(“yyyy”).Substring(2) +“卒”
Str_Target2 = System.DateTime.Now.AddYears(2).ToString(“yyyy”).Substring(2) +“卒”
Str_Target3 = System.DateTime.Now.AddYears(3).ToString(“yyyy”).Substring(2) +“卒”
I want to use these 3 variable in create form activity as dropdown list items.
so I set FormFieldCollections(arguments) as follows.
How can I set those properties to get dropdown list items correctly? (Expected results as follows)Thank you!!!
Yoichi
(Yoichi)
January 4, 2022, 9:52am
2
Hi,
We need to use List<String>
to pass values to form, as the following.
options = New List(Of String)From{"1","2","3"}
Then
Regards,
1 Like
111962
(YU.)
January 4, 2022, 2:41pm
3
@Yoichi さん、Thank you very much every time.
I tried to verify using the method you taught me, but for some reason the options in the dropdown list were displayed twice, as shown in the figure below.
The settings are as follows.
Str_Target1 = System.DateTime.Now.AddYears(1).ToString(“yyyy”).Substring(2) +“卒”
Str_Target2 = System.DateTime.Now.AddYears(2).ToString(“yyyy”).Substring(2) +“卒”
Str_Target3 = System.DateTime.Now.AddYears(3).ToString(“yyyy”).Substring(2) +“卒”
List_Options = new List(of String) From{Str_Target1,Str_Target2, Str_Target3}
Do you know where I am going wrong?
Is there any way to set the first dynamic value of the list as default value(in the place holder)
Thank you very much!!!
Other than the above settings and the label on the display tab, I haven’t changed any other settings.
Yoichi
(Yoichi)
January 4, 2022, 3:35pm
4
Hi,
Can you compare the following sample with yours?
Sample20220105-1.zip (3.5 KB)
Regards,
1 Like
111962
(YU.)
January 5, 2022, 12:30am
5
Thank you for your quick reply. I will check this out.
111962
(YU.)
January 5, 2022, 5:50am
6
I compared it with the xaml file you shared with me and it solved the above problem successfully. Thank you very much !!!
1 Like
system
(system)
Closed
January 8, 2022, 5:51am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.