I have the following formula
Cond(LogUserDefValue01='',0,Round(((((1-((Val(LogUserDefValue01)))))*(LogDepth+10)) /0.79)-10,1))
which returns 0.0 if the LogUserDefValue01 is blank and does the other calculation if there is a number present.
What I would like it to do is return a blank or text rather than the 0.0 where there is no LogUserDefValue01 entry but it wont accept text or a space. Error returned:
'Argument error wrong type of data at 'Cond' (expected:string, is:Number)
Does anyone have any idea how this could be done?
I am storing the Oxygen % as a decimal in LogUserDefValue01 and the above formula calculates the EAD.
Thanks
Designer Formula
Re: Designer Formula
Hi
You can use the "Appearance Condition" to hide either the row or the entire field by using the formula:
You can use the "Appearance Condition" to hide either the row or the entire field by using the formula:
Code: Select all
LogUserDefValue01 <> ''
Re: Designer Formula
Thank you, that works perfectly, much appreciated
Re: Designer Formula
I have another formula query which I hope someone can help with.
At the moment I have this formula 'Cond(LogTankSize=14,"ü")' which puts a tick in a box if the tank size is 14.
I would like to put the tick in the box if the tanksize was either 7 or 14. Can this be done? I have tried to do a multiple if statement but it is not clear from the designer manual if this is supported.
Any ideas?
At the moment I have this formula 'Cond(LogTankSize=14,"ü")' which puts a tick in a box if the tank size is 14.
I would like to put the tick in the box if the tanksize was either 7 or 14. Can this be done? I have tried to do a multiple if statement but it is not clear from the designer manual if this is supported.
Any ideas?
Re: Designer Formula
Doh just got it
Cond(LogTankSize =7 or LogTankSize= 14,"ü")
Cond(LogTankSize =7 or LogTankSize= 14,"ü")
Re: Designer Formula
Am definitely stuck now.
The divetype field stores multiple types in the following format: 1,2,3 representing Fun, Education, Night
I want to have a formula that checks the entry in the dive type field for a specific type in order to populate a spefic dive type box with a tick.
So for the 'Fun' box it would examine the field and look for a 1, for the Education box if would search the entry for a 2 and so on.
Can you use a wildcard with Cond(LogDiveType ="Fun","ü")?
Thanks
The divetype field stores multiple types in the following format: 1,2,3 representing Fun, Education, Night
I want to have a formula that checks the entry in the dive type field for a specific type in order to populate a spefic dive type box with a tick.
So for the 'Fun' box it would examine the field and look for a 1, for the Education box if would search the entry for a 2 and so on.
Can you use a wildcard with Cond(LogDiveType ="Fun","ü")?
Thanks
Re: Designer Formula
You can use this formula: Cond(Contains (LogDiveType,"Fun"),"ü")
Re: Designer Formula
I print my log pages in batches of 4 so I get 2 per side of a sheet of A4 using booklet printing feature on my printer.
The problem with this is that the Bottom time to date calculation is the same on all the log pages in that batch.
So if I select and print log pages 214-221 (8 pages) the cumulative bottom time on all 8 is shown as of after dive no 213
Formula in use is:
Fstr$(Int((StatsDivetimeToSel - StatsDivetimeBtSel )/60),"###&") + ":"+
Fstr$((StatsDivetimeToSel - StatsDivetimeBtSel )%60,"&&")
Is there any way to make the calculation work based on the individual dive numbers from a group of dives?
Thanks
The problem with this is that the Bottom time to date calculation is the same on all the log pages in that batch.
So if I select and print log pages 214-221 (8 pages) the cumulative bottom time on all 8 is shown as of after dive no 213
Formula in use is:
Fstr$(Int((StatsDivetimeToSel - StatsDivetimeBtSel )/60),"###&") + ":"+
Fstr$((StatsDivetimeToSel - StatsDivetimeBtSel )%60,"&&")
Is there any way to make the calculation work based on the individual dive numbers from a group of dives?
Thanks
-
- Posts: 11
- Joined: Mon Aug 13, 2012 12:54
Re: Designer Formula
I'm new to the forum and DL5.0 so forgive me if I am using the forum inappropriately. The attached question is one I've been trying to figure out myself. At the top of the logbook print out it has Divenumber and time displayed. I would like to add 'total dive time' to this line, but only up to and including the current dive. Everything I've tried thus far shows total time for all dives in minutes. I'm not SQL versed, so if someone could identify the appropriate field and syntax for adding this item to my printed log page I will be grateful. Also I'd like the time displayed in HR:MIN rather than total minutes.Adeydiver wrote:I print my log pages in batches of 4 so I get 2 per side of a sheet of A4 using booklet printing feature on my printer.
The problem with this is that the Bottom time to date calculation is the same on all the log pages in that batch.
So if I select and print log pages 214-221 (8 pages) the cumulative bottom time on all 8 is shown as of after dive no 213
Formula in use is:
Fstr$(Int((StatsDivetimeToSel - StatsDivetimeBtSel )/60),"###&") + ":"+
Fstr$((StatsDivetimeToSel - StatsDivetimeBtSel )%60,"&&")
Is there any way to make the calculation work based on the individual dive numbers from a group of dives?
Thanks
Re: Designer Formula
Hi
Normally the formula you quoted should do the trick, have you tried that one?
Kind regards,
Sven
Normally the formula you quoted should do the trick, have you tried that one?
Kind regards,
Sven
Re: Designer Formula
This is probably a step too far but I'll give it go.
I use LogUserDefValue01 to store the amount of O2 in a nitrox gas and then have a calculated field in my log page to work out the O2 partial pressure ((LogDepth +10)/10) * val(Fstr$(((Val(LogUserDefValue01)/100)),"#####&.##")).
What I would like to be able to do is have a way to do a lookup to either a new table within the access database or even an external excel worksheet to find the oxygen exposure. In excel you would use something like Index and match functions. You would need to plot the LogDivetime on the x axis and the calculated O2 pp on the y axis and show the %value at the intersection of the appropriate column and row.
Any thoughts if this would be possible?
I use LogUserDefValue01 to store the amount of O2 in a nitrox gas and then have a calculated field in my log page to work out the O2 partial pressure ((LogDepth +10)/10) * val(Fstr$(((Val(LogUserDefValue01)/100)),"#####&.##")).
What I would like to be able to do is have a way to do a lookup to either a new table within the access database or even an external excel worksheet to find the oxygen exposure. In excel you would use something like Index and match functions. You would need to plot the LogDivetime on the x axis and the calculated O2 pp on the y axis and show the %value at the intersection of the appropriate column and row.
Any thoughts if this would be possible?
Re: Designer Formula
If you enter the O2 value into the O2 field this is all working as it should. Just use the extended layout 2 or add the O2 field to your own layout. Then you can simply display the PPO2 profile.
You can see the O2 field:
PPO2 profile (which can also be printed in the report designer):
No need for any formula or user defined fields. See also: https://www.divinglog.de/english/tutorials/tec.php
You can see the O2 field:
PPO2 profile (which can also be printed in the report designer):
No need for any formula or user defined fields. See also: https://www.divinglog.de/english/tutorials/tec.php