Creating Unique Slugs Based on User Names from Relations
Hi there, I can't help my novice skill and knowledge. I need help, please.
I want to create a slug based on users' full names. I attempted to add the slug field to the 'user' table but discovered that I couldn't have more than one unique index. So, I added the slug field under my 'profile' table, which already has a relational field linked to 'user.id'. In the 'profile' endpoint of the API, how can I filter:
[the current user who will create a 'profile' data: extracting the full name from the 'user' table] is not the same as [any user with the same full names]?
This would enable me to generate an incremental slug based on the creator's full name within the 'profile' database.
Any insights or guidance you can provide would be greatly appreciated. Thank you!
Answers
-
For two questions I would run two queries using query-all-records. Then check the answers from both - if they come back empty, you're good to go.
Xano's power really comes out when you start adding steps to the function stack. Explore that a little bit and I think you'll uncover a lot of opportunity. -
Hi Ray, thank you very much for your response. What I'm still struggling to understand is how to utilize the fullname field in my 'user' table as a criterion for determining whether it's 'equal to or different from' the fullname of the current user's profile, which I need to specify in the 'query-all-records' when I'm working within the 'profile' endpoint of the API.
Is there a tutorial available that I can watch regarding this matter?
-
Sorry I lost track of this thread. Did you crack your problem?
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback