1 column 2 different result

Hi. I have a column called Registered name.  The rule of this column is

1. If it has reserved name, user can pick from the Reserved name table

2. If no, name will be assign it to it randomly.

I want this to happen in the registered name column. Maybe combining the two expression using IF or SWITCH statement. I have tried but error due to function is used incorrectly or cannot have two different type i

0 4 109
4 REPLIES 4


@snerdya wrote:

1. If it has reserved name, user can pick from the Reserved name table


This is a dropdown list.


@snerdya wrote:

2. If no, name will be assign it to it randomly.


I am not sure what you want here. You mean if the user does not see a name he/she likes from the dropdown list (Reserved Names) then, you want to fill the Registered name column with a random value (i.e. UNIQUEID())?

 

my department offer a service to reserve names to our clients. if they have reserve 2 or more names, they can choose which name to use for their 'item' (sorry i cant disclose what the item is). If the client does not reserve any name then we will assign names from our list. So in the form, we will ask if they have reserved any name. If they do, they can choose from the reserve name table. if they dont, then we will assign name for them.

 

IF(
 COUNT(
  FILTER(
   "Reserved name",
   [client] = [_THISROW].[client]
  )
 ) > 0,
 SELECT(
  Reserved name[name],
  [client] = [_THISROW].[client]
 ),
 LIST(
  INDEX(
   table containing random names[name],
   RANDBETWEEN(
    1, 
    COUNT(table containing random names[name])
   )
  )
 )
)

If you set this in Suggested Values of the column, it should display a dropdown list with the client's reserved name(s) if any, otherwise one of the names you maintain.

This doesn't do none of the navigations you mentioned (ask if a client has reserved name(s), then display them, if not,, etc) but simply presents a list of 'valid' names that the client can choose from.

Also adapt the expression to your actual table/column definitions.

thank you. I'll try and see if it works in my app.

Top Labels in this Space