I have a page that we use to set permissions for roles, which is a series of checkboxes in repeating groups that are checked depending on whether or not a specific permission is found in a field.
This morning, I looked and none of my checkboxes are checked (indicating that there is no match in the data). I haven’t changed the page or the data, though (confirmed the data is still present), and I did confirm that what I expect is outputting within the repeating group.
Anyone else had issues with the dynamic status not working? Is this a known issue?
I am reading the Dynamic Status from a state, and I have outputted the state to confirm that the data that should be in there is present.
Correct, I have checkboxes which should be checked (and historically have been checked) which are no longer appearing checked. This is a role system, so I am using a repeating group to output checkboxes, which get compared to a text that is stored in a state to determine whether they should be checked or not.
This was working fine last time I loaded the page, and now is not. There have been no data or code changes on our end.
Just for clarity, here is the property window for one of the checkboxes:
I suggest you have a look at the debugger and see the different elements of that expression and what’s inside them. Check if they match what you expect
I don’t know that they do. I’m not super familiar with the debugger, but selecting the checkbox the debugger says that it is not checked, and it has no value. But I am outputting the roles’s permission_list to the page and also outputting Current cell’s Security’s Permission and the later is definitely within the former.
To troubleshoot, I outputted the state on the page and also in the reusable element, I outputted the value I’m checking against. So both elements of the expression are visible, see:
The part that is strange about this is that this has been working fine for months. There have been no changes on our side. It simply stopped working as it has been.
In theory, the “claims_view” checkbox should be checked.
The error might be in that your are telling Bubble to check if a given Permission is contained in a list of texts, which can never be true as is.
You’ll need to either store Permission objects inside role's permissions_list of extract the text from that Current cell's Security's Permission object.
Could you write that role's permission_list contains Current cell's Security's Permission expression in a Text element inside the RG’s cell and check it with the debugger?
Well - that’s super weird. The state has no value by the time it gets to that part of the page. I didn’t even think to check it again after it was already successfully outputting higher up. I’m still not sure what’s going on, but that gives me something to test further. Thank you @ademiguel !