# M:1 relationship - Assign & Update value for a new item

**URL:** <https://forum.adalo.com/t/m-1-relationship-assign-update-value-for-a-new-item/2747>\
**Category:** Get Help\
**Created:** [July 25, 2020, 5:17pm UTC](https://forum.adalo.com/t/m-1-relationship-assign-update-value-for-a-new-item/2747 "2020-07-25T17:17:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![theophilus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theophilus/32/1439_2.png) [@theophilus](https://forum.adalo.com/u/theophilus)\
**Post date:** [July 25, 2020, 5:17pm UTC](https://forum.adalo.com/t/m-1-relationship-assign-update-value-for-a-new-item/2747/1 "2020-07-25T17:17:01Z")

</div>

Hello all

I’m beginner in Adalo.

I want to create e-commerce type app similar to ‘Order’ Default Adalo Template.

In my case, I want to have a ‘Status’ Collection, which indicates status of the order - Started, Confirmed & Paid, Delivered. So 3 items.

My ‘Order’ collection has m:1 relationship with Status collection. Each status can have many orders, one order belongs to one status.

I’m not able to assign default values to ‘Order’ while creating or updating. I am able to assign them via form entry by user. But I need default value to be ‘Started’ when order is created, when customer pays to be ‘Confirmed & Paid’, etc. automatically without user input.

In ‘Order’ template app, status is updated as text. I do not believe this is right way, because on Admin side app, that status should be filter able, etc. And admin should be able to add more status types in future.

Any help appreciated please.

---

<div class="post-metadata">

**Author:** ![karimoo](https://avatars.discourse-cdn.com/v4/letter/k/ad7895/32.png) [@karimoo](https://forum.adalo.com/u/karimoo)\
**Post date:** [July 25, 2020, 5:50pm UTC](https://forum.adalo.com/t/m-1-relationship-assign-update-value-for-a-new-item/2747/2 "2020-07-25T17:50:36Z")

</div>

See: [How to have a Form Automatically Set a Status (or any other related record) - Adalo Resources](https://help.adalo.com/how-to/form-status)  
You can also search for _Default Value_ in the forum search 😉

---

<div class="post-metadata">

**Author:** ![bibipac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bibipac/32/786_2.png) [@bibipac](https://forum.adalo.com/u/bibipac)\
**Post date:** [July 27, 2020, 8:16am UTC](https://forum.adalo.com/t/m-1-relationship-assign-update-value-for-a-new-item/2747/3 "2020-07-27T08:16:12Z")

</div>

Before all, check if Stripe is available in your country…for eCommerce there is no other options as of now.

- 1 you need to set “Order Status Field” Not visible if user is not an Admin.
- 2 Visible if user IS an admin, that way user can not change it.  
Probably want to create 2 Admins
- SysAdmin : Can create new statuses and know what he is doing 🙂
- SalesAdmin : Can only change status of the order without breaking your App. 😁  
That way, only SysAdmin can mess with the system… which we hope wont happen

---

<div class="post-metadata">

**Author:** ![theophilus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theophilus/32/1439_2.png) [@theophilus](https://forum.adalo.com/u/theophilus)\
**Post date:** [July 27, 2020, 7:06pm UTC](https://forum.adalo.com/t/m-1-relationship-assign-update-value-for-a-new-item/2747/4 "2020-07-27T19:06:17Z")

</div>

Thank you @karimoo and @bibipac

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [August 6, 2020, 7:06pm UTC](https://forum.adalo.com/t/m-1-relationship-assign-update-value-for-a-new-item/2747/5 "2020-08-06T19:06:21Z")

</div>

Closed on August 6, 2020, 7:06pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
