It looks like if there are duplicate values in a popup menu in myriad tables, the first instance is removed, is that correct?
I’m trying to make this work easier for the user. Most of the selections in this list would Sunday’s; but a few of them would be weekdays (which may or may not include Sunday), and several would always be Wednesdays.
So the effect I’m trying to get is for the popup menu to display the next three Sundays; then every day of the week (including Sundays) below.
Instead it displays the full list without Sundays.
Is removing the first instance of duplicates at the beginning of a popup list intentional?
I’d prefer to display them with dupes, or if that’s not practical, keep the first instance and remove subsequent instances.
use scripting additions
use script "Myriad Tables Lib" version "1.0.7"
set rowTemplate to {"", {popup menu, {"Sunday, July 7, 2019", ¬
"Sunday, July 14, 2019", ¬
"Sunday, July 21, 2019", ¬
"Sunday, July 7, 2019", ¬
"Monday, July 8, 2019", ¬
"Tuesday, July 9, 2019", ¬
"Wednesday, July 10, 2019", ¬
"Thursday, July 11, 2019", ¬
"Friday, July 12, 2019", ¬
"Saturday, July 13, 2019", ¬
"Sunday, July 14, 2019", ¬
"Monday, July 15, 2019", ¬
"Tuesday, July 16, 2019", ¬
"Wednesday, July 17, 2019", ¬
"Thursday, July 18, 2019", ¬
"Friday, July 19, 2019", ¬
"Saturday, July 20, 2019", ¬
"Sunday, July 21, 2019", ¬
"Monday, July 22, 2019", ¬
"Tuesday, July 23, 2019", ¬
"Wednesday, July 24, 2019", ¬
"Thursday, July 25, 2019", ¬
"Friday, July 26, 2019", ¬
"Saturday, July 27, 2019"}}}
set {dateList, firstSunday, firstWednesday, firstDate, sundayList} to {{"Sunday, July 7, 2019", ¬
"Monday, July 8, 2019", ¬
"Tuesday, July 9, 2019", ¬
"Wednesday, July 10, 2019", ¬
"Thursday, July 11, 2019", ¬
"Friday, July 12, 2019", ¬
"Saturday, July 13, 2019", ¬
"Sunday, July 14, 2019", ¬
"Monday, July 15, 2019", ¬
"Tuesday, July 16, 2019", ¬
"Wednesday, July 17, 2019", ¬
"Thursday, July 18, 2019", ¬
"Friday, July 19, 2019", ¬
"Saturday, July 20, 2019", ¬
"Sunday, July 21, 2019", ¬
"Monday, July 22, 2019", ¬
"Tuesday, July 23, 2019", ¬
"Wednesday, July 24, 2019", ¬
"Thursday, July 25, 2019", ¬
"Friday, July 26, 2019", ¬
"Saturday, July 27, 2019"}, ¬
"Sunday, July 14, 2019", ¬
"Wednesday, July 10, 2019", ¬
"Monday, July 8, 2019", ¬
{"Sunday, July 7, 2019", ¬
"Sunday, July 14, 2019", ¬
"Sunday, July 21, 2019"}}
set dateListPubList to {}
set the end of dateListPubList to {"What's on TV Coverage Plan", firstSunday}
set the end of dateListPubList to {"What's on TV", firstDate}
set the end of dateListPubList to {"Calendar Letters", firstSunday}
set the end of dateListPubList to {"What's on TV This Week", firstSunday}
set the end of dateListPubList to {"TV Ratings", firstWednesday}
set tableData to dateListPubList
set tableTitle to ""
set tableResult to display table with data tableData ¬
with title tableTitle row template rowTemplate
return values selected of tableResult