Google sheets users role

So I have decided for multiple reasons to move from airtable to google sheets as a data sources. Mainly for the record limits, performance and since air table started making plan changes without increasing their capacities by any significant amount I feel it’s the safest route.

Im building a b2b kinda staffing website.

Now here comes my issue: I am slowly transitioning everything from air table but one big issue I have is that I can’t seem to figure how to add USER ROLES in google sheets. Everything I did seems to not be recognized by softr and whenever I block certain blocks for certain groups they simply won’t show up while testing due to the fact that softr dosen’t sync the user roles.

I feel quite stupid on this one but if there is any way I could do it and someone knows I would greatly appreciate this one.

thanks in advance

Hi @ArmandoNikol sorry to hear that you faced some inconvenience.
Would you mind sharing some screenshots of your setup (both from Gsheet and Softr) so I could see how you’re trying to set up the user groups and reproduce on my end?

Hey Viktoria, I just managed to fix it. It was on my part. But of course now I’m stuck with another issue.
Tags can’t be color like in air table.

Saw some snippet code in the community’s forum but is one year old and it appears not to work anymore sadly

I’m glad to know you managed to fix it. Thanks for your response.

Indeed, the tag can’t be colored with GSheet as with Airtable, it’s DS specific feature. To be honest, I’m not aware of a custom code that might help with it, would you mind sharing the thread with me, I will ask the developers to check if it’s possible to implement for the new blocks.

Hi @ArmandoNikol ! Here we go.

<script>
document.addEventListener("DOMContentLoaded", function() {
    const colorMap = {
        'tagname': {
            'text': '#1A1A1A',
            'background': '#CFDFFF'
        },
    }
    setInterval(function() {
        for (let key in colorMap) {
            if (colorMap.hasOwnProperty(key)) {
                const targetElements = document.querySelectorAll('.MuiChip-root.tag-item[data-content="' + key + '"] span.MuiChip-label');
                targetElements.forEach(function(element) {
                    const parentDiv = element.parentElement;
                    parentDiv.style.backgroundColor = colorMap[key]['background'];
                    const innerSpan = element.querySelector('span[style]');
                    innerSpan.style.color = colorMap[key]['text'];
                });
            }
        }
    }, 200);
});
</script>

Simply replace three things in the code, the tag name, text color and the background color!

2 Likes

This seems to work! thank you very much.

Thanks! this works perfectly!