Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to select field in the multi row formula tool manually by using macro?

Pultayap
7 - Meteor

Hello All,

i would like to be able to choose field(s) which is in the multi row formula from outside of macro 

in this example

---

IF([product_id]=[Row+1:product_id] AND [item_id]=[Row+1:item_id])
THEN "duplicated" ELSE "unique"
ENDIF 

---

i would like to change the product id  from outside of macro as store_no( it is also in dataset)  so as result if i select to store no my multi row formula will be like this: 

---

IF([store_id]=[Row+1:store_id] AND [item_id]=[Row+1:item_id])
THEN "duplicated" ELSE "unique"
ENDIF 

my macro attached. if somebody help i will be much appreciated 

Thanks

 

4 REPLIES 4
cgoodman3
14 - Magnetar
14 - Magnetar

Hi 

 

One way to do this is to use a drop-down interface tool.

 

If you set the drop down to have the required values that you want the user to select, as shown in this example.

Screenshot 2020-10-10 at 19.21.34.png

 

Then in the action tool set the tool to "update value", then select expression and then tick the box to replace a specific string, in this case replace product_id then it will replace that with the value selected in the drop down.

Screenshot 2020-10-10 at 19.24.13.png

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
Pultayap
7 - Meteor

fırst of all thanks for response. 

If ı do as you say, as ı see ,ı need to get ınsıde of macro ıf there ıs dıfferent dataset. what ı want to ıs be able to choose prımary fıelds wıthout get ın macro. So ı thought that lıst box ıs gonna be rıght decısıon to do thıs but ı couldnt ımplement thıs. So wıthout get ınsıde of macro and regarless of dataset , is ıt possıble to change ındıcated fıelds ın that formula  by choosıng just specıfıc fields from outsıde of macro? 

vstefano
7 - Meteor

Hi,

Hi riattached here the macro updated with a new modification to be independent of starting colum names.

I have modified the original macro so that you can select which columns to insert to choose the fields of the formula, no matter the structure of the input dataset (hence if columns in a new dataset have different names you do not need to enter the macro and change the formula).

 

The columns are initially renamed first col, second col and third col. Then they get back to their original name.

 

vstefano_0-1602362769276.png

 

vstefano_1-1602362802020.png

 

vstefano
7 - Meteor

I attached also an alternative solution that should solve your problem without using macro. If the scope is just to find the duplicates, you just need to select the columns in the unique tool just after the input:

 

vstefano_0-1602363802317.png

 

Labels