I have the “User Profile” sheet as the main sheet and I want to bring or extract the emails from the main sheet to a newly created sheet named “Revenue-Profit” numbers, for now I have used the following method to do that:
- In the 1st column there are RowId.
- In the 2nd column I have created an array of all the RowId’s.
- I am using the array “Find Element Index” function to find the RowId no. in the array of RowId’s, which gives output starting from “0”. For eg. RowId no. “C” is present at 02nd position (starting from 0) in the RowId’s array i.e. [A, B, C, D, …] so the output is 2.
- I have Implemented the above steps in the user profile sheet too.
- Using this RowId number, I am extracting the email from the User Profile sheet via the “Single Value Feature”.
What other columns are in your Revenue-Profit numbers table?
Because that is a table that presumably contains static values, and then you are dynamically inserting a column with email addresses, it seems to me that the values in the static columns will not correspond to the dynamically inserted email addresses. So I’m not really sure what the point of the exercise is?
It will @Darren, yes there are static values of Revenue and Profits of the company in the other columns, so when the user views the page/ screen he will see the static values as a default first and will be able to change when he wants to via the input field.
So when a new user logs in, with the current method his email will get registered against the last used email row and the app will filter the correct row for that user based on the email to show him/her the default values.
PS: Since Glide doesn’t have a default value feature for a particular column (where you have a default value for the entire column and can also be changeable), we have found this way of doing it.
I see. So basically you are just creating a row for each user in the new sheet and allowing them to add/edit the static values, yes?
Question: do you have Row Owners applied anywhere in either table? If you do, then this won’t work as not all users will get the same number of rows.
I can’t tell from your screen shot, but it looks like your data source is either Google Sheets or Excel. I think a safer approach would be to mirror the rows from your Users sheet using a sheet/excel formula.
No, we don’t use the Row Owners concept anywhere, the reason being the same mentioned by you.
Yes you are right this is the safest approach, we were using that before transitioning into the current one, but our current google sheet is very big and works slow, so it used to take us 3 mins before for a user to be see the default values. We have used a button method where when the user fills the email in a welcome screen (designed by us as soon as the glide authentication is done) and clicks the button it will insert the email to a new row and set the default values, but that option is not scalable to us at this moment due to the complexity of our app.
One way to insert default values would be to add an if-then-else column for each field. User enters data into the entry column, but the data displayed is the if-then-else column, which contains and displays the default value if user-entered value is null, or displays the user entered data if it exists.
If other users don’t need to see each others’ entries on that sheet, you might find your sheet consists of just one row, having the user entered columns being user-specific columns,
Would this work for you?