Same popupmenu settings on 2 windows

I have 2 windows named “winfiledialoge” and “WinMain”, both have the same text fields and desktopPopupMenus. The below code it run from the “winfiledialoge” Window.

When changing the values in the text fields on the “winfiledialoge” Window, they become the same on the other Window which happens with the FocusLost Event Handler, using this code:
winmain.TextFieldStoryAuthor.Text = winfiledialoge.txtQSFAuthor.text

Now I would like to do the same with the DesktopPopupMenus, but that is not working.
I tried this in a SelectionChanged Event Handler with this code:
Winmain.PopQSCategory.SelectedRowValue = winfiledialoge.PopupSCategory.SelectedRowIndex

Trying this gives me this error:

WinFileDialoge.PopupSCategory.SelectionChanged, line 23
Cannot assign a value to this property
Winmain.PopQSCategory.SelectedRowValue = winfiledialoge.PopupSCategory.SelectedRowIndex

I also tried it by using a Module Variable to transfer the value between Windows, but this doesn’t work either.

Is this code incorrect, or is there another way to transfer a desktopPopupMenuValue to another window?

SelectedRowValue is a String - SelectedRowIndex is an Integer - you are doing a typemismatch.
Use selectedRowIndex if both Popupmenus are identically filled…

If you go to the documentation:
you will read that SelectedRowValue:

This property is read-only.

Why are you not using .SelectedRowIndex for both?

Ah, thanks for spotting this. I actually used Index all the time, but now I mixed them up.However it still does not work, now the popupmenu in the second window is not following the choice from the popupmenu on the 1st window. It always is set to row 0.

Can you create and share a sample project?

And like most of the time after having tried to get it work or days… Now I asked about I here on the forumt, it’s suddenly working! The combination of using .index and a super variable to transfer the index value from 1 popupmenu to the the one on the other window. So like this:

Window 1:
CatQS2MainWin = winfiledialoge.PopupSCategory.SelectedRowindex

Window 2:
Winmain.PopQSCategory.SelectedRowIndex = CatQS2MainWin