Forum Academy Marketplace Showcase Pricing Features

How to define the names of data within a data type? solved

To try and explain so it makes sense, my application has a data type which is a “Class”. I want to display these “Classes” for a user to join but I want each class to be set by me the creator (meaning there are only the classes I list that are available and the user can’t create a class). So basically the user doesn’t have to click anything but the class (as defined by it’s name eg. Science) still exists for other users. Where can I define these classes and then put them in a group which a user can join?

By “I” do you mean the developer or admin.
If the Class list is not going to change regularly then as a developer you can just create a table in the database call Class with fields such as name (e.g. Science, Maths, etc), and other fields.
If the Class list is dynamic and will change regularly then you can create an admin page for adding or removing a Class thing.

:rolling_eyes: i dont think your post. just good one.

Oh I wasn’t aware of the table in the database. Thank you.

Oh I didn’t know you meant tables as in data types. Yes I have a data type called class and there a bunch of fields with the names(Science, Math, etc.) as text but when trying to show these in a repeating group (where the repeating group content is class and then search for class) they will now show up

If it makes it easier to solve, I want a data type “Class” where it has the fields, “Following”, “Posts”, and “Name”. The name of which I want to set myself without user input. So how to I (the developer) create a lot of classes all with a different value for “Name”

You can manually create a Class records either in the App Data tab or creating an interface for yourself to create them through workflows. Either way, you can set the Name field’s value for each Class. Then, for the users to view them, have a repeating group on the page (type: Class, source: Search for Classes). Within the repeating group’s cell, add a text element to display the “Current Cell Class’ Name”

So you can easily set the Class table with the fields name (text), following (list of User), post (list of Post). You will have to create the Post data type first.
See image below:

Then to add an entry to your Class table, Click on Data (1), App Data(2) and New entry (3) as shown below. Then you can enter the name of the class.

1 Like

I did not know that, thank you so much.

For displaying the class names just follow what @romanmg (she already beat me to it, was coming to explain but just saw her post).
I have a snapshot below for you in case you still dont get it.