Assign the data of an entire row

Hello everyone
I have to assign the data of an entire row to an employee.
In the sheet I have 2 columns “userselect” where I insert the driver and in the second column “drive” I insert the last name of the employee.
in this way I can assign the row to a second employee by inserting the sign / between a surname and another and changing the value of the column “userselect in drive2.
Is there an easier way to do this?
by deleting the userselect column?
AND(
CONTAINS(
IFS(
[UserSelect]=”drive 1” , LEFT([drive],FIND(”/",[drive])-1),
[UserSelect]=”drive 2” ,RIGHT([drive],FIND("/",[drive])+1),

	),
	LOOKUP(USEREMAIL(),DB,EMAIL,UTENTI)
),
OR(
	isblank([status]), 
	in([status], list("open", "closed"))
)

)

Solved Solved
0 14 499
1 ACCEPTED SOLUTION

You’re awesome!!!
Thank you!
works perfectly!!!

View solution in original post

14 REPLIES 14

EIG
New Member

Hi,
I might be missing what you are trying to do but I believe that you want to be able to have a drop down of drivers in the [UserSelect]. This drop down can be a reference to another table which will contain [UserSelect] and [drive]. Then in your original table the drive column can pull that data from that table. You could also do this the other way where the drop down is on the drive column and the userselect is automatically filled in.

This might help: https://www.appsheet.com/samples/A-basic-demo-of-table-references?appGuidString=6ffad040-b04a-4325-a...

See the “New Appt” tab.

Hi thanks for the answer what I’m doing is assigning a row of data to an employee, not from the appsheet but from the google email beck end.
For now I can do it but I would like if possible delete the userselect column.
if I write a surname in the Drive column using the USEREMAIL formula.
the line is displayed by the employee

Does the assignment have to be done in the Google back end? Or would you like to be able to do it from AppSheet app?

Hi
To back and Google sheet.

Since your data entry is happening on the Google back end, you really are at the whim of how that data is structured. What you have is probably the easiest it can get on the AppSheet side. To make it less cumbersome on the AppSheet side you would need to restructure the way the inputs are saved in Google.

With that said, there is another approach you can use for separating and picking out the assigned employees. You can use a combination of INDEX() and SPLIT() functions.

For example you could change your IFS() to the below:

AND(
CONTAINS(
IFS(
[UserSelect]=”drive 1” , INDEX(SPLIT([drive],”/"), 1),
[UserSelect]=”drive 2” , INDEX(SPLIT([drive],"/"), 2),

<rest of your expression>

You can then, a lot more easily, add even more assigned employees as LEFT() and RIGHT() functions can only take you so far before they become very messy.

thanks i tried and it works
but is there a way to delete the “userselect” column?
that is if I insert “francesco” the data I assign them to FRANCESCO.
if I write FRANCESCO / LUCA the data sees them only LUCA

I’m not clear on where you are having this problem. Can you show us an example image of what you mean?

Thanks a lot!!
I will try;)

I’m sorry!
I would not perform the step of manually entering “drive 1 or drive 2” in the userselect column.
I would like that if I insert a single name it gives me automatically “DRIVE1 if I insert a second name after the sign” / “give me” DRIVE 2

Sorry. I didn’t realize you had responded or I would have replied earlier.

Ok, so its the Google sheet you are trying to improve. Got it! Just know that since this an AppSheet forum, the answers will be based around AppSheet functions. They will not always translate directly to Google sheet formulas.

As I understand it, you are asking how to make the Google sheet present the Drive information so you don’t have to use the Userselect column.

Yes , that is possible and since you only want to show Drive 1 OR Drive 2 then it can be simplified by removing the IFS() altogether to get the complete expression as follows:

AND(
    CONTAINS(
           INDEX(SPLIT([drive],”/"), COUNT(SPLIT([drive],”/"))),
	       LOOKUP(USEREMAIL(),DB,EMAIL,UTENTI)
	),
    OR(
	       isblank([status]), 
	       in([status], list("open", "closed"))
      )
)

I have not tested this, so be sure to do so and let me know if you have issues.

You’re awesome!!!
Thank you!
works perfectly!!!

Thank you, you were so kind.
one last thing if you can!!!
example in the column “DRIVE” I insert Francesco
is there a way to display that francesco is driver 1?
if I write FRENCH/LUCK instead
LUCA is driver two.
Also on appsheet would be good, I’m afraid that if I write formulas on the sheet it gets too heavy.

Sorry, again I didn’t see that you replied. Are you clicking Reply at the bottom of the post or within the Reply? If you choose within the response itself then I’ll get a notification.

Yes, you will be able to indicate Driver1/Driver2. The question is how would you want to show this in Appsheet? I haven’t seen what you app looks like so I don’t know how you are displaying the data.

But let’s say you have a column named Driver and right now you show the driver 1 value when only one is entered and the driver 2 value when two are entered. Now you want the column header to reflect which driver position is being shown - Driver 1 or Driver 2.

You can modify the column header is the Display settings for the column in AppSheet.

In your case you would add an expression into the “Display Name” property using the Split expression like above. It would be something like:

CONCATENATE("Driver ", COUNT(SPLIT([drive],”/"))

I’m not sure if that is what you are looking for, so just let me know.

you’re a genius!!!
thanks a LOT!!!

Top Labels in this Space