I’m attempting to build my first not-a-tutorial app. Parts are going well and parts are infuriating. Hoping someone can help with the latter.
I have a Data Type called Project Details. It includes a bunch of fields like “Creator”, “Project Name” and other obvious fields. It also includes a “status” field. This field draws values from an Option Set I created that contains a list of standard project statuses e.g. “New”, “Rejected”, “Waiting for Approval”, “In Progress” etc.
I created a project status page where a user can see all of the projects they have submitted. I also created an admin page where the projects can be updated by an admin.
What I want to do is:
Create a Repeating Group that shows a list of all projects along with their status.
For each row in the repeating group, have a drop down populated with all of the values of my Status Option Set.
For each row in the repeating group, have an UPDATE button that changes the Status to whatever is selected in the dropdown.
I managed to get 1 & 2 working, but I cannot seem to figure out how to do #3.
It seems to me that I want a workflow that “When Button Update is clicked” proceeds to “Make Changes to a Thing” and then simply updates the Status field with the value from the dropdown. However, Bubble seems to disagree.
It definitely sounds like you are making great progress, @nick12… congrats!
If I am reading your post correctly, it sounds like you’ve got something like this…
… and when you click the update button, you want the current status to change to the option that is selected in the dropdown, right?
If that’s what you are going for, then you are dead on… you need to make changes to the current cell’s project, and you would change its status to the dropdown value’s display. If that’s not working for you, I’m guessing you just need to tweak something in the workflow where you are making that change. If you can share a screenshot or two, I would be happy to try to help you figure it out.
Quick suggestions: Reload (refresh) your editor. Do you see new options?
IF the “Update” button is the button inside the repeating group cell (which it seems to be), what you “should” see is an option to make changes to “current cell’s Thing”. Did you perhaps select the wrong “Update” button as the trigger in your workflow?
I think it might be something with your repeating group because for Thing to change, you should have an option of Current cell’s Project Details. In other words, you shouldn’t have to do a search for anything there.
I have a Vertical Scrolling, 4 row, 1 column repeating group. Type of content is TEXT.
The data source is currently Current User’s Submitted Projects:sorted (which actually is wrong as I want this to show the projects from all users, not just the currently logged in user).
Then I have 3 text boxes.
The first is just “Current Cell’s Text” and it returns an ID value I create for each project.
The second is a search for Project Details’ Project Name (a field in Project Details). It returns the project name.
The third is a search for Project Details’ CurrentStatus’s Display. It returns the current project status.
I then have a drop down with Dynamic Choices of Type TEXT. The source is All ProjectsStatus’s Display. (i.e. all of the values in the Option Set). Option Caption is set to Current Option.
Then I have the Update button.
As far as I can tell, everything is inside the group correctly. Here’s what the design screen looks like:
Yup, that’s definitely the problem. You shouldn’t have to do those searches to get what you need for the repeating group. If you change the type of content of the repeating group to Project Details, you should have access to the data you want without having to search, and you should also get the appropriate option for Thing to change for the Update button in the workflow.
So Type of Content for the repeating group should be Project Details. Should the Data Source be “Search for Project Details”?
I now see Current Cell’s Project Details under things to change. I can select pdCurrentStatus as the field and put an “=”, but the “dropdown A” value is greyed out…
Hmm… if the pdCurrentStatus field has a type of projectStatus and the dropdown has the same type, it should’t be greyed out. There is no way this is going to work, but just for the heck of it, try to refresh your project or close it and reopen it again. Maybe it just doesn’t know it’s not a mismatch anymore?
To get a list of all projects, just get a list of all projects. Note that privacy rules you’ve set up may prohibit the display of projects that do not belong to the “Current User”… And, as a result, you may NEVER be able to display a list of all projects. Which is as it should be.
Of course, you can create a privacy rule (e.g., “Current User is administrator”) that trumps all rules. And, in this way, you might see all projects.
Yup, what Keith said, too. If you don’t have any constraints on your search, then it’s your privacy rules that are limiting the projects. Good stuff, Keith!
Thanks for the assist here, @mikeloc. You know your stuff. Sometime, somebody needs to do a video (that nobody will ever watch, of course) that explains this stuff. Of course, nobody will ever do that because nobody will ever watch it. Classic Catch-22.