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! Go to Solution.
Youโre awesome!!!
Thank you!
works perfectly!!!
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!!!
User | Count |
---|---|
27 | |
26 | |
22 | |
21 | |
20 |