当前位置:网站首页>Primavera Unifier 高级公式使用分享
Primavera Unifier 高级公式使用分享
2022-08-11 09:08:00 【蚕豆哥】
Oracle Primavera Unifier 虽然很强大,但在早期版本中因数据处理比较死板还是有些挺多争议,而高级公式这个功能的的加入一定程度上就提高了数据处理的灵活性,根据一朋友的召唤下,这里简单分享一个案例
(PS. 此功能去年20.12 版本上即已加入)
需求:需要一个字段同时体现工单号及项目编号,且格式为 “工单号 / 项目编号”
拿到这个课题自然而且想到组成这个字段需要3个独立的关键要素,即:
- 工单号
- /
- 项目编号
其中工单号及项目编号显然是手动输入,/ 作为连接符 可以通过一个静态的文本写入“ / ”(注意/前后各有一空格)
确认好思路后即准备建立对应的要素,(为方便理解,要素ID直接用了中文拼音)
- 工单号:QZ_gongdanhao
- /:PU_lianjiefu_xiegan
- 项目编号:GC_fenxiangbianhao
针对需要组合的要素使用高级公式
使用字符串函数 concat(str1, str2)
需要注意的是concat 只能同时接上两个字符串,因此 concat(工单号,/ )连接后将作为一个新的str再与项目编号会重新组合连接
进行错误检查,保存关闭,发布BP后 最后效果如下
如此,效果达成!
看到这里,可以发现,使用固定公式是需要具备一定的IT开发基础,否则可能想不到是用concat来实现该功能,不过有总比没有的强
...
当然,还有其他公式也是使用类似的方法,相信如果你具备JAVA基础基本都难不倒你
以下是我从ORACLE HELP 搜寻的对应内容(基于 Unifier uDesigner User Guide Version 21)
搜索关键词:Advanced Formulas
核心内容已贴上,如下,希望对感兴趣的你有所帮助
String 字符串类别
Function | Tooltip |
(indexOf(String, int)) | Starting point of a string within another string starting at a defined point in the string. |
(indexOf(String)) | Starting point of a string within another string starting at the beginning of the string. |
(length()) | Length of a string. Formating a numeric field to a string, for example: numeric value of 9 with a format of "00000.00" would result in a string of "00009.00". |
(startsWith(String, int)) | Checking to ensure if a string starts within a defined string starting from a defined index. Needs to support indexOf. |
(startsWith(String)) | Checking to ensure if a string starts within a defined string. |
(endsWith(String)) | Checking to ensure if a string ends with a defined string. |
(substring(int)) | Pulling a substring from another string starting at a defined point till the end. This needs to support indexOf. |
(substring(int, int)) | Pulling a substring from another string starting at a defined point till a defined point in the string. This needs to support indexOf. |
(concat(String)) | Concatenating stings including being able to define numeric fields as strings. |
(contains(String)) | Checking to ensure if a string contains another string. |
Comparing strings | Not available. |
Numeric 数字类别
Function | Tooltip |
(toString(format)) | Converting a number or currency to a string with a defined format. |
(abs()) | Absolute value of a number |
(sqrt()) | Square root of a number. |
(power(int)) | Raised to the power. |
(log()) | Logarithm Base 10. |
(ln()) | Natural Logaritm. |
(min(number, ….)) | Minimum of a set of numbers. |
(max(number, ….)) | Maximum of a set of numbers. |
(ceil()) | Round up to the smallest integer that is greater than or equal to the value of the field. |
(floor()) | Round down to the largest integer that is less than or equal to the value of the field. |
(round(int)) | Round to the number of decimal places. |
Comparingnumbers =, !=, >, >=, <, <= | Not available. |
补充 详细功能
String Functions | Numeric Functions | Date Functions |
compare(str1,str2) | abs(num) | date(year,month,day) |
compareIgnoreCase(str1,str2) | max(num1,num2) | day(date) |
concat(str1,str2) | min(num1,num2) | edate(date,months) |
contains(str,search) | ceil(num) | eomonth(date,months) |
containsAny(str,search1,search2,...) | floor(num) | month(date) |
containsIgnoreCase(str,search) | log(num) | now() |
endsWith(str,suffix) | log10(num) | today() |
endsWithIgnoreCase(str,suffix) | pow(base,exponent) | weekday(date) |
indexOf(str,search) | round(num,places) | weeknum(date) |
indexOfAny(str,search1,search2,...) | sqrt(num) | year(date) |
indexOfIgnoreCase(str,search) | isNumber(num) | addDays(date,amount) |
isAlpha(str) | numberFormat(num,pattern) | addHours(date,amount) |
isBlank(str) | toDouble(num) | addMonths(date,amount) |
isEmpty(str) | toInt(num) | addWeeks(date,amount) |
isNumeric(str) | toLong(num) | addYears(date,amount) |
isNumericSpace(str) | cos(num) | dateDiff(start,end) |
lowerCase(str) | sin(num) | dateFormat(date,pattern) |
upperCase(str) | tan(num) | isSameDay(date1,date2) |
matches(str,regex) | acos(num) | toLong(date) |
left(str,len) | asin(num) | toDate(long) |
leftPad(str,size) | atan(num) | |
leftPad(str,size,padStr) | cosh(num) | |
mid(str,pos,len) | sinh(num) | |
right(str,len) | tanh(num) | |
rightPad(str,size) | ||
rightPad(str,size,padStr) | ||
replace(str,search,replacement) | ||
replaceAll(str,regex,replacement) | ||
replaceFirst(str,regex,replacement) | ||
startsWith(str,prefix) | ||
startsWithIgnoreCase(str,prefix) | ||
size(str) | ||
strip(str) | ||
substring(str,start) | ||
substring(str,start,end) | ||
truncate(str,maxlen) |
以上只是一个高级公式运用示例,如有其他场景运用无法实现/或不知无法实现可向我咨询。
这个行业的分享不多,希望更多感兴趣的朋友一同参与,探讨或合作 !
本人可提供Oracle 多种产品技术服务,包括产品的部署和维护及培训,欢迎与我取得联系!
如何联系蚕豆哥_蚕豆哥的博客-CSDN博客电邮:[email protected] (@gmail.com,@outlook.com)https://campin.blog.csdn.net/article/details/52950969
边栏推荐
- 通过Xshell连接Vagrant创建的虚拟机
- 【wxGlade学习】wxGlade环境配置
- tensorflow 基础操作1(tensor 基本属性 , 维度变换,数学运算)
- 安装ES7.x集群
- Openlayers 聚合图、权重聚合图以及聚合图点击事件
- Unity3D - modification of the Inspector panel of the custom class
- One network cable to transfer files between two computers
- 观察表情和面部,会发现他有焦虑和失眠的痕迹
- Nuget can't find the package problem
- Notable NFT development trends in 2022
猜你喜欢
随机推荐
What should I do if the mysql data query causes the cup to be full because the query time span is too large
MongoDB 对索引的创建查询修改删除 附代码
gRPC系列(一) 什么是RPC?
mindspore 执行模型转换为310的mindir文件显示无LRN算子
Has legal counsel become a tasteless product of law firms?
SDUT 2877: angry_birds_again_and_again
DataGrip配置OceanBase
专题讲座8 字符串(一) 学习心得
持续集成/持续部署(2)Jenkins & SonarQube
通过Xshell连接Vagrant创建的虚拟机
基于 VIVADO 的 AM 调制解调(3)仿真验证
wordpress插件开发02-首页文章自动摘要插件开发
YTU 2297: KMP pattern matching three (string)
[UEFI]EFI_DEVICE_PATH_PROTOCOL 结构体初始化的一个例子
YTU 2297: KMP模式匹配 三(串)
【系统梳理】微服务的注册和发现中心
Lightweight network (1): MobileNet V1, V2, V3 series
dsu on tree(树上启发式合并)学习笔记
关于ts的一些泛型关键字用法
How to use QTableWidget