but cant assign same product id again
biscuit? Meaning?
that what i want
Ohh okay
So here you said the user B is also able to add that product?
So, What part you want to make unqiue?
want to set unique my product id so that one user cant use same product id for differrent produt or i can say handling dupplicate
So you want to make sure that the combination of Product+ID is unqiue?
meaning ?
What part you want to be unqiue in your collection? What set of data?
Okay, What are those two fields? id - product id barcode - ?
And what's not working?
Okay
There is no out-of-the-box way to achieve this.
What I would do is to add another attribute name user_id, then I will create a unique index that combined user_id + id
This way I can rest assure that any user can have any product just once.
index creation failed . again and again
This probably because you've two-values that are the same.
When you've added the user_id attribute, it's now empty? if so make sure you don't have any two id values that are the same
Because if they are the same you won't be able to add unique as it's not unique.
index creating is fail in clould version if size is more the 400 for string, changed size now able to create indexing
but this is not if my attribute size is large
@Binyamin Thanks man for your time.
It's working now?
π
how can i delete this post
Click on the menu on the top
But I'm no sure it will delete the whole post.
there's no need to delete posts. it's best to leave it for others to see how things resolved
Recommended threads
- Appwrite Auth & Function don't reveal cl...
When I execute a function or sign in with my Flutter app, Appwrite does not show my real IP: instead, it seems that Appwrite shows Fastly CDN IP address.
- All function deployments fail (node 18-2...
Error: bash: /usr/local/server/helpers/build-cache.sh: No such file or directory Sidecar error: Build archive was not created at /mnt/code/code.tar.gz Scope: ...
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...