community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Record # without record ID

Asteroid

Hi, 

 

Is there a way to reference the record # in formulas without adding a Record ID tool first?

Alteryx_record #.JPG

Quasar

The only time I have used the Record # (Aka Row#) is in the Multi-Row Formula Tool.

 

Alteryx Example:

Capture.PNG

 

If that's not helpful, please post additional information so we can help you with your specific use case.

Asteroid

Thanks @ddiesel, I also want to use in that tool with something like the below such that [CurrentVariable] ends up having one value equal to Row# 1 of [ABC]:

 

IF [Row#]=1 THEN [ABC] ELSE [Row-1:CurrentVariable] ENDIF

 

I can do it by adding [Record ID], but was hoping to reference Record # / Row# without needing that. 

Quasar

If there's another way, I don't know how --- but I'm not a very advanced user. Maybe others can chime in. 

 

If your formula works with the RecordID, is it a problem?

 

 

Can you post a small sample of your input data and your desired output? That usually helps get the best response possible.

Asteroid

 If your formula works with the RecordID, is it a problem?

 


I am only chasing a ~1% efficiency gain by removing the need for 1 unnecessary tool!

Quasar

@mb1824 I just cross my fingers that no one looks under the hood of my workflows and applications! They mostly get the job done... but surely not in the most efficient manner.

 

I'll be curious to see if there is a better way that we don't know about yet.

 

 

 

 

Alteryx Certified Partner
Alteryx Certified Partner

The question still puzzles me.   If you were to take the data into a SAMPLE tool and get the 1st record out, you could append that value to all records (APPEND FIELDS).  I'm fairly certain that the multi-row formula is where you will land.  If you know that the field can't be NULL, you can check for isnull() of the row-1 and know that you're on the 1st record without an ID.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Asteroid

@MarqueeCrew

 

Thanks for the comment. 

 

I have attached a workflow of what I am trying to achieve. I get data that looks like this - Row 1 contains the Date (C1) & Time (C2) the data was exported. The real data is row 5+ for columns 2 & 3 with headers in Row 4

 

Alteryx_record # without record ID.JPG

 

 

I want to remove the unnecessary cells and generate a DateTime stamp of each record.  

 

I have done my Method (#1) and your method (#2). Both give the desired (& same) outcome

 

My original question for Method 1 was - can I remove the need for the Record ID tool by being able to reference Record # in the Multi-Row formula tool. As I said to @ddiesel, I am only chasing a 1% efficiency gain

Highlighted
Bolide

@mb1824,

 

Not totally positive on this, but I don't think there would be an efficiency gained... The Record Number is not actually data but rather a visual aid in the results tab of the program, similar to the record number when running a query in Microsoft SQL Server Management Studio. If you were able to access it like a piece of data Alteryx would have to run the same process as the Record ID tool at the beginning of every workflow, even those that do not use/need a Record ID tool. Thus causing a efficiency decrease for all workflows not needing this column. Which is why they have the Record ID tool, so that you can create the column when needed.

 

Hope this makes sense. :)

 

Best,

MSalvage

 

Asteroid

@MSalvage

 

Thanks for the comments - it does make sense

Labels