[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Multiple fields in 1 view column

Posted on 2006-05-01
12
Medium Priority
?
225 Views
Last Modified: 2013-12-18
I have a form called Yieldsheet1 with 2 fields called so and so2. I have 2 agents that each run an @dblookup. They find data in another database based on the keyword from a field on Yieldsheet1 called batch. Now after the dblookups are run, it may populate multiple data in field so and field so2 and it also may produce Entry not found in index. My problem is the view. I need to have all data from so and so2 in one column in a view and seen as separate documents and if there are any errors display "Na".
0
Comment
Question by:schmad01
  • 4
  • 4
  • 3
  • +1
12 Comments
 
LVL 18

Expert Comment

by:marilyng
ID: 16582539
Create a computed field called "so_parsed", multivalue, separate each value with newline on your form.

Then the formula (with assistance from a previous sjef post)

FullList:= so:so2 + "|";
x:= "|"+ @Right("~" + FullList; "~|");
y:=@Replacesubstring(@Replace(FullList; x; "NA");"|";"");
y


The view column formula should be: "so_parsed", separate values with new line.

0
 
LVL 14

Expert Comment

by:cezarF
ID: 16582549
schmad01,

1 use @IfError on you so and field so2 field to trap "Entry not found in index"
2. in your view column property (sorting tab), tick "Show multiple values as separate entries"

hope this helps.
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 1000 total points
ID: 16586063
i.e. in view column:

@Trim(@If(!@IsError(so);so;""):@If(!@IsError(so2);so2;""));
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 18

Expert Comment

by:marilyng
ID: 16588111
Thanks guys for the error trapping.. !
0
 

Author Comment

by:schmad01
ID: 16588452
So which should I use for the view column formula:  so_parsed  or  @Trim(@If(!@IsError(so);so;""):@If(!@IsError(so2);so2;""));   ?
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16588685
Well the first stores the data again in the document so is a one-off process for you to refresh all your exisgting doxuments to include this field then you can set the view column to the fieldname.  The second means it has to be recalculated every time the view is built and therefore gives some minor extra load on the server.  

To get the na you asked for too just amend as :

@If(!@IsError(so);so;"N/A"):@If(!@IsError(so2);so2;"N/A")

Steve
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16590594
The only reason why  I didn't suggest this is because I don't know how many values are going to be in the so/so2 fields.   When the list is unknown, then you shouldn't try to parse it in a view.  :)
0
 

Author Comment

by:schmad01
ID: 16590725
Ah. makes sense. Shouldn't be too much data, though. Will try everything tomorrow.  Thanks everyone!
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16591604
Famous last words... then a few years down the line, the application stops running.  :))  (had that happen).  At any rate, several good suggestions here for you to try.
0
 

Author Comment

by:schmad01
ID: 16595648
I know for a fact that the data will not grow past a certain point. So, that is why I used this suggestion.  Thank you all.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 16599301
Well thanks for the points, take note of marilyng's comments though :-)

Steve
0
 

Author Comment

by:schmad01
ID: 16599747
Absolutely. I take note of everyone's comments.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question