1

I have the following layer table

Prim | Secondary |Tertiary
Apple | Apple Pen | Apple Pen White
Apple | Apple Pen | Apple Pen Red
Apple | Apple Phone | Apple Phone Black
Apple | Apple Phone | Apple Phone Silver
Banana| Banana Bread | Banana Bread Chocolate
Banana| Banana Smoothie| Banana Smoothie Sugar
Banana| Banana Yoghurt | Banana Yoghurt Smooth
Banana| Banana Yoghurt | Banana Yoghurt Fruit
Car | Car Toyota | Car Toyota Yaris
Car | Car Toyota | Car Toyota Corolla
Car | Car Ford | Car Ford Figo

I was able to use value relations and a value map to create a drop-down for 2 levels.

I used a value map for the Primary QGIS Screenshot

I used a value relation widget for the secondary. I used the expression : "Primary Code"= current_value('Primary')

QGIS Screenshot However, I am struggling to get the third level.

It should be able to limit the choices you can choose when editing the attribute table.

eg.

If I choose Apple in the Primary column then in the second column, I should only be able to select Pen or Phone, if I chose Pen then in the Tertiary column, I should only be able to select White and red and Black or silver if I chose Phone.

1 Answer 1

1

Just do a value relation with the expression:

"Primary Code"= current_value('Primary') AND "Secondary Code"= current_value('Secondary')

answered Feb 9, 2021 at 23:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.