Get originating field

  • 10 November 2016
  • 4 replies
  • 0 views

Badge +1

Good day to all!

Say you have a list with 18 fields.  These fields contain values that are associated by name in six groups of three.  Example: 

Project 1         Task 1           Subtask 1         Project 2        Task 2        Subtask 2         Project 3     Task3......

The goal is to query any given row for the value of a defined variable and return which field it was found in. 

Example:

Project 1         Task 1           Subtask 1         Project 2        Task 2        Subtask 2         Project 3     Task3......

   One               Green              Cotton               Two             Blue               Wool              Three         Red

If we query the current item for a variable with value  "Two," then we know that it came from Project 2.  Ultimately we would use this as a "key" of sorts to then bring the associated Task and Subtask with it.

Any thoughts on this would be appreciated.  Thanks in advance to the community.


4 replies

Userlevel 5
Badge +14

what exactly you mean with QUERY?

query list action?

if so then it should be possible, if you configure CAML query on your own.

Badge +11

‌, did ‌ resolve your issue? If so, please mark the solution correct. That way if anyone else has a problem like this they will know how to resolve it.

Thanks,

Lisa

Badge +1

No, I was speaking generally--not referencing the query list action specifically.  What I meant was, If we "look" in the current row/item...

Incidentally, I came up with a solution using several collections and a generic value to loop through.  As the generic values were cycled through, I was able to match those values against the "real" field names and their corresponding values.  Once a match was found, I merely retrieved the remaining values in the "group" and stopped processing.

Worked like a charm.  If anyone is interested in more detail, feel free to message me--I'd be happy to share the design.

Thanks!!!!

Userlevel 5
Badge +14

hence my very first question wink.png

I'm glad you managed to find your own way.

here is how I would probably do it if I were in scenario like yours.

one&simple build string action happy.png

Reply