I have a form with numerous data cards that auto-populate based on actions on other screens.
I changed one of the card 'ParkDataCard' to a Dropdown.
I need the Dropdown to default to the employee's home Park based information on another screen. The above worked with the default data card. Now that I've changed the field to a Dropdown I'm having issue getting the data to display.
I'm trying the following in the Default property of the DataCard/ParkCardValue
If(NewEmployeeForm.Mode = FormMode.New, Parent.Default, varIsPark)
Solved! Go to Solution.
Hi @Anonymous ,
One last question, do you mean that you have a column named Region which contains data like this: Region1, Region2,...?
Then what do you want to display in the Region1 textinput , Region2 textinput in the form?
I assume that if that Region field data is Region1, then the Region1 textinput display as Ragion1 and Region2 textinput display as blank in the form.
Then you could set like this:
1)Park drop down's Items
ParkListCollection
Park drop down's AllowEmptySelection: true
Park drop down's Default:
If(!IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text))),
LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text)).Park,
""
)
insert a label with text "the individual is not currently in the system" , set the label's Visible:
IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text)))
2)site name textinput Default:
If(!IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text))),
LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text),SiteName),
//if the individual is already in Member list, 'Park' and SiteName auto-populate from MemberList
LookUp(ParkListCollection,Park=Parkdropdown.Selected.Park,SiteName)
//if the individual is already in Member list, site name auto-populate based on selection of park and ParkListCollection
)
Region1 textinput Default:
If("Region 1"=
If(!IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text))),
LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text),Region),
//if the individual is already in Member list, 'Park' and region auto-populate from MemberList
LookUp(ParkListCollection,Park=Parkdropdown.Selected.Park,Region)
//if the individual is already in Member list, region auto-populate based on selection of park and ParkListCollection
),
//get region value
"Region 1",
" "
)
//compare with region1
Region2 textinput Default:
If("Region 2"=
If(!IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text))),
LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text),Region),
//if the individual is already in Member list, 'Park' and region auto-populate from MemberList
LookUp(ParkListCollection,Park=Parkdropdown.Selected.Park,Region)
//if the individual is already in Member list, region auto-populate based on selection of park and ParkListCollection
),
//get region value
"Region 2",
" "
)
//compare with region2
Best regards,
Hi @Anonymous ,
Please the see way to set the Default Value in Property in Custome form for DropDown.
Thanks,
Hi @Anonymous ,
Do you want to display a drop down's default based on information on another screen?
Could you tell me:
1) 'ParkDataCard' field data type?
2) what is your data source?
3)formula in the drop down's Items?
3)where do you get the information on another screen? from what control? related field data type?
4)how do you set this variable varIsPark?
What's more, please notice that:
you need to make sure value of varIsPark exists in the drop down's Items.
Or else, it could not display correctly.
Best regards,
Let me try this way....
Here is the form in question. The form Default mode is set to 'New' at all times.
The User should be able to create a new employee profile or enter a new cert or qual for an existing employee using the same form.
The User enters the individuals 'UnqID'; if the individual is already in the system (on the Member list), they are already and employee and the User is trying to add a new cert or qual; at this point a majority of the form (including the 'Park' auto-populates based on Form:DataSource:MemberList.
The question, if I change the Card:Park to a Dropdown, can a condition be written that provides the above functionality, as well as if the individual is not already an employee (proven by the fact the 'UnqID' returns no data when entered), the User will have to manually enter all other data - with the Park Dropdown pulling park names from ParkListCollection, and the Site Name, Region 1, Region 2 auto-populate based on the Park Dropdown.
Currently all Fields Auto-populating have: 'varCQRecord.Park' in the Default property.
'varCQRecord.Field...'
'varCQRecord.Field...'
Hi @Anonymous ,
Could you tell me:
1)Park field data type in Member list?
2)if the individual is already in Member list, 'Park' auto-populates, what about Site Name, Region 1, Region 2? Do you have fields for Site Name, Region 1, Region 2 in Member list?
3)if the individual is not already in Member list, 'Park' drop down blank. The Park Dropdown pulling park names from ParkListCollection, and the Site Name, Region 1, Region 2 auto-populate based on the Park Dropdown.
What's the differences between Park field in ParkListCollection and in Member list?
I want to know whether you want the park drop down's Items to ParkListCollection or Member list.
Whether do you have fields for Site Name, Region 1, Region 2 in ParkListCollection?
Since your issue is about a collection and a list, so I need to know when do you want to use collection or list, including drop down's Items and Default and other fields'.
Based on the information that I've known, maybe you could set like this:
I assume that UnqID is number type, Park is text type in the list.
1)Park drop down's Items
ParkListCollection
Park drop down's AllowEmptySelection: true
Park drop down's Default:
If(!IsBlank(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text))),
LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text)).Park,
""
)
2)site name textinput Default:
LookUp(ParkListCollection,Park=parkdropdown.Selected.Park,SiteName)
Region1 textinput Default:
LookUp(ParkListCollection,Park=parkdropdown.Selected.Park,Region1)
Region2 textinput Default:
LookUp(ParkListCollection,Park=parkdropdown.Selected.Park,Region2)
Best regards,
My apology; I was away.
Could you tell me: (see my responses in blue)
1)Park field data type in Member list? (Park field is Text)
2)if the individual is already in Member list, 'Park' auto-populates, what about Site Name, Region 1, Region 2? Do you have fields for Site Name, Region 1, Region 2 in Member list? (The Member list has columns for Region, Site Name, an all other fields. The Member Training List also has exact and corresponding data as the Member list. Also, both lists have a 'UnqID' field that is a Text field and looks like CT0000; the member's initials and four digit code)
3)if the individual is not already in Member list, 'Park' drop down blank. (Yes, if Member is not on Member list, default to blank, and generate error message that "the individual is not currently in the system") The Park Dropdown pulling park names from ParkListCollection, (Yes; there is a Park list. The Park List has the park specific data; similar to the Member List containing all the Member specific data, and the Training List containing all the Training data. The ParkListCollection is made from the Park List) and the Site Name, Region 1, Region 2 auto-populate based on the Park Dropdown. (Yes, all data on Screen 1 CURRENTLY auto-populates into the Gallery based on the content of the Park Dropdown)
What's the differences between Park field in ParkListCollection and in Member list? (There is no difference. Park data/content type are the same on both lists)
I want to know whether you want the park drop down's Items to ParkListCollection or Member list. (The Park Dropdown is populated by the ParkListCollection because each park only appears once on the Park list. Each park could appear dozens of times on the Member list)
Whether do you have fields for Site Name, Region 1, Region 2 in ParkListCollection? (There is a Region column that can contain any one of seven regions; and a Site Name column)
Since your issue is about a collection and a list, so I need to know when do you want to use collection or list, including drop down's Items and Default and other fields'. (Due to the amount of data in some lists (>5000 items), I've created Collections for all lists. Please assume all data sources are Collections, and not lists)
Hi @Anonymous ,
One last question, do you mean that you have a column named Region which contains data like this: Region1, Region2,...?
Then what do you want to display in the Region1 textinput , Region2 textinput in the form?
I assume that if that Region field data is Region1, then the Region1 textinput display as Ragion1 and Region2 textinput display as blank in the form.
Then you could set like this:
1)Park drop down's Items
ParkListCollection
Park drop down's AllowEmptySelection: true
Park drop down's Default:
If(!IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text))),
LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text)).Park,
""
)
insert a label with text "the individual is not currently in the system" , set the label's Visible:
IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text)))
2)site name textinput Default:
If(!IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text))),
LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text),SiteName),
//if the individual is already in Member list, 'Park' and SiteName auto-populate from MemberList
LookUp(ParkListCollection,Park=Parkdropdown.Selected.Park,SiteName)
//if the individual is already in Member list, site name auto-populate based on selection of park and ParkListCollection
)
Region1 textinput Default:
If("Region 1"=
If(!IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text))),
LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text),Region),
//if the individual is already in Member list, 'Park' and region auto-populate from MemberList
LookUp(ParkListCollection,Park=Parkdropdown.Selected.Park,Region)
//if the individual is already in Member list, region auto-populate based on selection of park and ParkListCollection
),
//get region value
"Region 1",
" "
)
//compare with region1
Region2 textinput Default:
If("Region 2"=
If(!IsEmpty(LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text))),
LookUp(MemberList,UnqID=Value(UnqIDtextinput.Text),Region),
//if the individual is already in Member list, 'Park' and region auto-populate from MemberList
LookUp(ParkListCollection,Park=Parkdropdown.Selected.Park,Region)
//if the individual is already in Member list, region auto-populate based on selection of park and ParkListCollection
),
//get region value
"Region 2",
" "
)
//compare with region2
Best regards,