Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection list and db traverse #819

Open
ermancio opened this issue May 26, 2017 · 1 comment
Open

Selection list and db traverse #819

ermancio opened this issue May 26, 2017 · 1 comment

Comments

@ermancio
Copy link

Hi,
In my Plomino DB I have a selection list populated from another Plomino db (dbname)
My code for the selection list field is:

ID = plominoDocument.restrictedTraverse("/sitename/dbname/")
view = ID.getView('MyView')
return [d.MyField1 + ' ' + 'for' + ' ' + d.MyField2 for d in view.getAllDocuments()]

So I select one value and save.

Now in a view I need to show a column deriving from one more field ([d.MyField3 for d in view.getAllDocuments()]); obviously this field must be related to the document containing MyField1 and MyField2.

Could you all suggest me an approach?

@ermancio ermancio changed the title Dependent selection lists Selection list and db traverse May 26, 2017
@ebrehault
Copy link
Member

I would suggest to store the doc id, so you can display the MyField1 value or the MyField2, MyField3 or any other field whenever you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants