Convert a single value into corresponding select item from table

We have a select list control “WeekSelect” that you pick the ‘week of’ for a schedule app. "WeekOf " is a table that has a display column of type Date. We create a new row in our schedule table based on the selected row from WeekOf table. What I want to do is preset the new row’s WeekOf value from what is the current selection in the WeekSelect control. I can get a Date value to populate in the new row, but that is not the same object as when someone manually selects the item from the drop down from the WeekOf table. Is there a formula that finds the matching list item from a value, or a automation that would take the date value and convert it to the equivalent of a select list object? I think what I need to do is find the matching row from WeekOf based on the values in the display column but not sure of the function for that.

Hi @John_Herrman , and welcome to the community!

If I understood correctly, the “Week Of” column is a relation column linked to the “DB WeekOf” table, right?

In your “WeekSelect” control, the options are set to the dates themselves instead of references to the “DB WeekOf” table (since you selected only the Name column as options). This explains why it is populating with a date instead of the object from DB WeekOf.

To fix this, simply change the “WeekSelect” options to DB WeekOf

This way, the options will be the actual objects from DB WeekOf, not just the dates. Since the Name column is set as the display column, the dropdown should still show the dates as expected.

Best regards
Arnhold

The other thing the WeekSelect control does is adjust the view of the schedule table. So for a given week selected, the table shows only those items associated with the week. So need to see if changing the WeekSelect from show just the display column vs the full row breaks that. Not worked much with select controls yet.

todate(thisRow.[Week Of])=todate(weekSelect)

Felipe_Arnhold, thank you! Your suggestion was the nudge I needed. I think I have it working now with just a few adjustments in some other filter functions.

1 Like